From nobody Thu Nov 28 12:35:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1670947303; cv=none; d=zohomail.com; s=zohoarc; b=ignrbyAJ7gyEOVQzry7fsI76uk2KG8G7kJxURztmlxpjnFXnAB/ZTJ09rCG+JEWSB3c1H1Bpk78TN4CiXjG2LRAPbf4047viAiLfEk+m8Pf7SBIl0RX2uEkFPGEVNgJ9XdFYEUOSip1yvFI550AFJkkSdSjMWE9oaEBdx2ovvsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670947303; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dpNYpi1fxBC/eShrKdLUi9ljmxvtfrqIkoCQUMZbd3o=; b=c3R7ybrQQgn9QNEns2khro+pYhvX/4QZGZA/rZlyUW+Vy3uHMV7Ln+JaGEzbTdliv8PE3vEO2kqQSQo2Ze01yzQqg9jmRFoWsNBO132sbQp9Ccwi4nb0q+1op1mLrBEj72vD77La+VXKYtro/6h9+mt/IClq8c0L3IM/RP8WgBA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1670947303639138.44585734431416; Tue, 13 Dec 2022 08:01:43 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.460724.718715 (Exim 4.92) (envelope-from ) id 1p57iM-0002XG-FQ; Tue, 13 Dec 2022 16:01:06 +0000 Received: by outflank-mailman (output) from mailman id 460724.718715; Tue, 13 Dec 2022 16:01:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p57iM-0002X9-Ba; Tue, 13 Dec 2022 16:01:06 +0000 Received: by outflank-mailman (input) for mailman id 460724; Tue, 13 Dec 2022 16:01:05 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p57iL-0001dt-Er for xen-devel@lists.xenproject.org; Tue, 13 Dec 2022 16:01:05 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 59050102-7aff-11ed-91b6-6bf2151ebd3b; Tue, 13 Dec 2022 17:01:04 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A4B97229F7; Tue, 13 Dec 2022 16:01:04 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 667AA138EE; Tue, 13 Dec 2022 16:01:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id O354F8ChmGN/KQAAMHmgww (envelope-from ); Tue, 13 Dec 2022 16:01:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 59050102-7aff-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1670947264; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dpNYpi1fxBC/eShrKdLUi9ljmxvtfrqIkoCQUMZbd3o=; b=PhusaDShad9p4mo6QMQs+X6+BxpEW3T6WJFICeyxj/WHkXwDW5EatTLBM2mtatHw/YxuDp sjeYoj6De02s3kqqmY5/p84I+vOCMRdhciyYMRDPI3vfqPhR1LWhu/pFtKxUVvg5jf+DEF 03uQFTK/bKnl09XDDW8wBetKjY/rg7w= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD , Julien Grall Subject: [PATCH v2 03/19] tools/xenstore: preserve errno across corrupt() Date: Tue, 13 Dec 2022 17:00:29 +0100 Message-Id: <20221213160045.28170-4-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221213160045.28170-1-jgross@suse.com> References: <20221213160045.28170-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1670947305092100001 Content-Type: text/plain; charset="utf-8" Let corrupt() preserve errno in order to be able to simplify error handling in future. This is rather easy as the errno value when entering corrupt() is saved already. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- tools/xenstore/xenstored_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_cor= e.c index d48208ecfe..8c2cca62b7 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -2549,6 +2549,8 @@ void corrupt(struct connection *conn, const char *fmt= , ...) talloc_free(str); =20 check_store(); + + errno =3D saved_errno; } =20 #ifndef NO_SOCKETS --=20 2.35.3