[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 17/38] tools/misc: drop all libxc internals from xen-mfndump.c
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 <jgross@xxxxxxxx> --- 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 xenhypfs.o: CFLAGS += $(CFLAGS_libxenhypfs) -# xen-mfndump incorrectly uses libxc internals -xen-mfndump.o: CFLAGS += -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall) xen-mfndump: xen-mfndump.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS) 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 <xenctrl.h> -#include <xc_private.h> -#include <xc_core.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> #include <unistd.h> #include <inttypes.h> +#define XC_WANT_COMPAT_MAP_FOREIGN_API +#include <xenctrl.h> +#include <xenguest.h> + #include <xen-tools/libs.h> #define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21) #define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL)) +#define ERROR(msg, args...) fprintf(stderr, msg, ## args) + static xc_interface *xch; int help_func(int argc, char *argv[]) -- 2.26.2
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |