From nobody Wed Feb 5 14:44:42 2025 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 ARC-Seal: i=1; a=rsa-sha256; t=1737017060; cv=none; d=zohomail.com; s=zohoarc; b=F1+P1dopTS+jRP/uKL5AvKpQwc0Hezb9OoMY0s8Z2mEQOoElFXDp25+M64DfTN77vkkGstylU7CP89dFmXyDwGPx6/Hb9yZzzV9EFxNGiNGMd07OMIEd8Uy9QkhYEhVXcwXSjTiHyxqx5tbXNpGgRsz4o9D5eboS+li86PxicFw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1737017060; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9YnMqT9L5zpcIdMPGD+T5rZV+9M0PECfN24dS3f5adI=; b=aivupwjIK+fqsD2jYgfmJgJVLvXz3WRWLBAoZ5XukNQZplOBbdx2kLP2+bOSPqlPTSY4mwWoPrelPmEi3iiqb+pIFmHAOp/U/YY5EKSb5eYjzCJYXDz3ByVNAsGaxsz35ZJSL3sExgb+4DpyRHBsVwXAvvRtHzxChHL4naSzcFU= 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1737017060385115.52257894595846; Thu, 16 Jan 2025 00:44:20 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.873237.1284196 (Exim 4.92) (envelope-from ) id 1tYLTk-0004St-Vj; Thu, 16 Jan 2025 08:43:52 +0000 Received: by outflank-mailman (output) from mailman id 873237.1284196; Thu, 16 Jan 2025 08:43:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tYLTk-0004QW-P5; Thu, 16 Jan 2025 08:43:52 +0000 Received: by outflank-mailman (input) for mailman id 873237; Thu, 16 Jan 2025 08:43:50 +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 1tYLTi-0004BI-Ex for xen-devel@lists.xenproject.org; Thu, 16 Jan 2025 08:43:50 +0000 Received: from casper.infradead.org (casper.infradead.org [2001:8b0:10b:1236::1]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ff9d8e86-d3e5-11ef-a0e2-8be0dac302b0; Thu, 16 Jan 2025 09:43:46 +0100 (CET) Received: from [2001:8b0:10b:1::ebe] (helo=i7.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tYLTd-0000000AkbV-0JOu; Thu, 16 Jan 2025 08:43:45 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tYLTc-00000007pI8-3Dc0; Thu, 16 Jan 2025 08:43:44 +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 X-Inumbo-ID: ff9d8e86-d3e5-11ef-a0e2-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=9YnMqT9L5zpcIdMPGD+T5rZV+9M0PECfN24dS3f5adI=; b=QAhTn+9luHDcx4ZBpcWeH90OPD kUrxeCoetP1gumKPKrYKI0tOm+chuyObKhh8XsUWhf15Snreba/gTrp9g4OmorKfNLsrOLHPEUpWP PQ+WEsNZikrHtjPm+i/8KmuA1lmh2mEXDeBieo3/4G2hhT/FN+eykSgP6+rjuBL2ftHX8UAtx8ih5 Bfcijh2bcxhKSL53SrxjdJIdyfwH/zccZnOt15oaxu+YZqIvHSP3CQoRNquwqLGot4MaBi9TKU+2A Uuz7NHdmOX8hnCLRLt6l7tmi54R1Ra25u9P6DxwUasWLonC7win3ViRVG9hZPpALXtbzuGHC9Y1cH T3091e/A==; From: David Woodhouse To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Stefano Stabellini , Anthony PERARD , Paul Durrant , "Edgar E. Iglesias" , Kevin Wolf , Hanna Reitz , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Jason Wang , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Phil Dennis-Jordan , David Woodhouse , Anthony PERARD , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PULL 6/8] hw/xen: Use xs_node_read() from xenstore_read_str() instead of open-coding it Date: Thu, 16 Jan 2025 08:43:30 +0000 Message-ID: <20250116084332.1864967-7-dwmw2@infradead.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250116084332.1864967-1-dwmw2@infradead.org> References: <20250116084332.1864967-1-dwmw2@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-ZohoMail-DKIM: pass (identity @infradead.org) X-ZM-MESSAGEID: 1737017061886019000 From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Anthony PERARD Acked-by: Roger Pau Monn=C3=A9 --- hw/xen/xen_pvdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c index c5ad71e8dc..c9143ba259 100644 --- a/hw/xen/xen_pvdev.c +++ b/hw/xen/xen_pvdev.c @@ -22,6 +22,7 @@ #include "qemu/main-loop.h" #include "hw/qdev-core.h" #include "hw/xen/xen-legacy-backend.h" +#include "hw/xen/xen-bus-helper.h" #include "hw/xen/xen_pvdev.h" =20 /* private */ @@ -81,12 +82,9 @@ int xenstore_write_str(const char *base, const char *nod= e, const char *val) =20 char *xenstore_read_str(const char *base, const char *node) { - char abspath[XEN_BUFSIZE]; - unsigned int len; char *str, *ret =3D NULL; =20 - snprintf(abspath, sizeof(abspath), "%s/%s", base, node); - str =3D qemu_xen_xs_read(xenstore, 0, abspath, &len); + str =3D xs_node_read(xenstore, 0, NULL, NULL, "%s/%s", base, node); if (str !=3D NULL) { /* move to qemu-allocated memory to make sure * callers can safely g_free() stuff. */ --=20 2.47.0