From 23ca442f63b1be891378186a44bf8f49218b4e8f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 26 Sep 2016 11:45:07 +0200 Subject: [PATCH] fish, inspector: get rid of COMPILING_VIRT_INSPECTOR All the define was doing in options.h was masking the declaration of inspect_mount_root, which was always built-in in inspect.c (because of the unconditional #define there) anyway. Since this is common code used by all the C tools, try to avoid extra knobs which add different code paths for no benefit. --- fish/inspect.c | 1 - fish/options.h | 6 +----- inspector/Makefile.am | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/fish/inspect.c b/fish/inspect.c index 4a5b3c36c..edfd2d47c 100644 --- a/fish/inspect.c +++ b/fish/inspect.c @@ -39,7 +39,6 @@ /* These definitions ensure we get all extern definitions from the header. */ #define COMPILING_GUESTFISH 1 -#define COMPILING_VIRT_INSPECTOR 1 #include "options.h" /* Global that saves the root device between inspect_mount and diff --git a/fish/options.h b/fish/options.h index e8a4ebcc3..a0863addc 100644 --- a/fish/options.h +++ b/fish/options.h @@ -119,17 +119,13 @@ extern int add_libvirt_drives (guestfs_h *g, const char *guest); /* in inspect.c */ extern void inspect_mount_handle (guestfs_h *g); +extern void inspect_mount_root (guestfs_h *g, const char *root); #define inspect_mount() inspect_mount_handle (g) #if COMPILING_GUESTFISH extern void print_inspect_prompt (void); #endif -#if COMPILING_VIRT_INSPECTOR -/* (low-level inspection functions, used by virt-inspector only) */ -extern void inspect_mount_root (guestfs_h *g, const char *root); -#endif - /* in key.c */ extern char *read_key (const char *param); diff --git a/inspector/Makefile.am b/inspector/Makefile.am index a872f4bcd..fe7bdab7b 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -69,7 +69,6 @@ virt_inspector_SOURCES = \ inspector.c virt_inspector_CPPFLAGS = \ - -DCOMPILING_VIRT_INSPECTOR=1 \ -DGUESTFS_WARN_DEPRECATED=1 \ -DLOCALEBASEDIR=\""$(datadir)/locale"\" \ -I$(top_srcdir)/src -I$(top_builddir)/src \