]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
tools/misc: don't include xg_save_restore.h from xen-mfndump.c
authorJuergen Gross <jgross@suse.com>
Sun, 23 Aug 2020 08:00:13 +0000 (10:00 +0200)
committerJuergen Gross <jgross@suse.com>
Fri, 28 Aug 2020 15:00:25 +0000 (17:00 +0200)
xen-mfndump.c is including the libxc private header xg_save_restore.h.
Avoid that by moving the definition of is_mapped() to xen-mfndump.c
(it is used there only) and by duplicating the definition of
M2P_SIZE() in xen-mfndump.c.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libxc/xg_save_restore.h
tools/misc/xen-mfndump.c

index 303081df0d1eaa3b42665c311d6262b428549ffb..b904296997e99bdc3102b46df3f4b62edacd8b57 100644 (file)
@@ -109,10 +109,6 @@ static inline int get_platform_info(xc_interface *xch, uint32_t dom,
 #define M2P_SIZE(_m)    ROUNDUP(((_m) * sizeof(xen_pfn_t)), M2P_SHIFT)
 #define M2P_CHUNKS(_m)  (M2P_SIZE((_m)) >> M2P_SHIFT)
 
-/* Returns TRUE if the PFN is currently mapped */
-#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
-
-
 #define GET_FIELD(_p, _f, _w) (((_w) == 8) ? ((_p)->x64._f) : ((_p)->x32._f))
 
 #define SET_FIELD(_p, _f, _v, _w) do {          \
index 858bd0e26b87548a87fffdd49897e4fd2bfc61a9..cb15d08c7e13fe574c1a1a5ea1d1a27c72b2d7ea 100644 (file)
@@ -5,7 +5,10 @@
 #include <unistd.h>
 #include <inttypes.h>
 
-#include "xg_save_restore.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))
 
 static xc_interface *xch;