From nobody Tue Feb 10 01:31:40 2026 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; 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=1598175375; cv=none; d=zohomail.com; s=zohoarc; b=B3qnG2rciaL8y9yvPEiUX+sRDLVLCBI9Mb+nD3TErQofU3JY49EoXDrVumwTrK2TUUcM/YCtEzQgH1CZyQhpeHFQClS9h7atuexfFRzXG9ZxP2d6KMD0VVyRhUhwPj08G/QTPgcyX3xKdr21btn1omXSEtK08kUqNzqTGrjX/rQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598175375; 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=iZuY8vyPtR4/esueGu0+EH8hJEJBzL/Z5NjQ6Opfxfs=; b=BCJ4rBWlcg/ONGjQ/zFyue+mre2sk0uKAeTaOKVdxi8nlVCupxtZkBt3tZtwwNehOUVZXJ5ES1TFD3EyvTKD/H1x9yClbyc6hSg0/xZcYsTA6JVJ8lj2n8FlKhns1n1usUEmCRy74+yjfzmPhLKjQ8mQMjNp/ivknmUAfmn2s3c= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1598175375856276.4228531183103; Sun, 23 Aug 2020 02:36:15 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k9mPp-0005AK-7x; Sun, 23 Aug 2020 09:35:53 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k9mPn-0004t9-SC for xen-devel@lists.xenproject.org; Sun, 23 Aug 2020 09:35:51 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id c7b2dc0b-7136-4b0a-8abf-e88d0c8fa61d; Sun, 23 Aug 2020 09:35:27 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 89FBCAE25; Sun, 23 Aug 2020 09:35:54 +0000 (UTC) X-Inumbo-ID: c7b2dc0b-7136-4b0a-8abf-e88d0c8fa61d X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH v3 17/38] tools/misc: drop all libxc internals from xen-mfndump.c Date: Sun, 23 Aug 2020 11:34:58 +0200 Message-Id: <20200823093519.18386-18-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200823093519.18386-1-jgross@suse.com> References: <20200823093519.18386-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" The last libxc internal used by xen-mfndump.c is the ERROR() macro. Add a simple definition for that macro to xen-mfndump.c and replace the libxc private header includes by official ones. Signed-off-by: Juergen Gross Acked-by: Wei Liu --- tools/misc/Makefile | 2 -- tools/misc/xen-mfndump.c | 13 +++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 2a7f2ec42d..7d37f297a9 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -99,8 +99,6 @@ xen-hptool: xen-hptool.o =20 xenhypfs.o: CFLAGS +=3D $(CFLAGS_libxenhypfs) =20 -# xen-mfndump incorrectly uses libxc internals -xen-mfndump.o: CFLAGS +=3D -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall) xen-mfndump: xen-mfndump.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(L= DLIBS_libxenguest) $(APPEND_LDFLAGS) =20 diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c index 92bc954ce0..62121bd241 100644 --- a/tools/misc/xen-mfndump.c +++ b/tools/misc/xen-mfndump.c @@ -1,15 +1,20 @@ -#define XC_WANT_COMPAT_MAP_FOREIGN_API -#include -#include -#include +#include +#include +#include #include #include =20 +#define XC_WANT_COMPAT_MAP_FOREIGN_API +#include +#include + #include =20 #define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21) #define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) =20 +#define ERROR(msg, args...) fprintf(stderr, msg, ## args) + static xc_interface *xch; =20 int help_func(int argc, char *argv[]) --=20 2.26.2