Message ID | 20221213160045.28170-3-jgross@suse.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <xen-devel-bounces@lists.xenproject.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9AE5FC10F1D for <xen-devel@archiver.kernel.org>; Tue, 13 Dec 2022 16:01:12 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.460723.718704 (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1p57iH-0002DQ-6K; Tue, 13 Dec 2022 16:01:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 460723.718704; Tue, 13 Dec 2022 16:01:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1p57iH-0002DJ-3H; Tue, 13 Dec 2022 16:01:01 +0000 Received: by outflank-mailman (input) for mailman id 460723; Tue, 13 Dec 2022 16:01:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <SRS0=7Djt=4L=suse.com=jgross@srs-se1.protection.inumbo.net>) id 1p57iG-0001ta-32 for xen-devel@lists.xenproject.org; Tue, 13 Dec 2022 16:01:00 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 55b84f6f-7aff-11ed-8fd2-01056ac49cbb; Tue, 13 Dec 2022 17:00:59 +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 0487622A1E; Tue, 13 Dec 2022 16:00:59 +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 CC2D1138EE; Tue, 13 Dec 2022 16:00:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6EmZMLqhmGNvKQAAMHmgww (envelope-from <jgross@suse.com>); Tue, 13 Dec 2022 16:00:58 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> X-Inumbo-ID: 55b84f6f-7aff-11ed-8fd2-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1670947259; 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=IYyxVkScp9Y7u/oG4opchX0eSNjJmBkYlufg+dfmLdE=; b=CexiKLaWiHw5fmoZEGl+11vnfDxFaZ+lSpvXDUaIgn2C2liNnO6jOONuw/76WNq9Nq8u3b +SAI6jN0jXBlPJ0PAo2ndAL5wf0AhdLmhiipqQO+ckIV5tCFfj2pojaq8pf9sprKyACzQy zZM3WMAs8vQT6gVhwgzlGZ2yg2FS3LE= From: Juergen Gross <jgross@suse.com> To: xen-devel@lists.xenproject.org Cc: Juergen Gross <jgross@suse.com>, Wei Liu <wl@xen.org>, Julien Grall <julien@xen.org>, Anthony PERARD <anthony.perard@citrix.com>, Julien Grall <jgrall@amazon.com> Subject: [PATCH v2 02/19] tools/xenstore: let tdb_logger() preserve errno Date: Tue, 13 Dec 2022 17:00:28 +0100 Message-Id: <20221213160045.28170-3-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: 8bit |
Series |
tools/xenstore: do some cleanup and fixes
|
expand
|
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 5a174b9881..d48208ecfe 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -2345,6 +2345,7 @@ static void tdb_logger(TDB_CONTEXT *tdb, int level, const char * fmt, ...) { va_list ap; char *s; + int saved_errno = errno; va_start(ap, fmt); s = talloc_vasprintf(NULL, fmt, ap); @@ -2360,6 +2361,8 @@ static void tdb_logger(TDB_CONTEXT *tdb, int level, const char * fmt, ...) trace("talloc failure during logging\n"); syslog(LOG_ERR, "talloc failure during logging\n"); } + + errno = saved_errno; } void setup_structure(bool live_update)