[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 2/3] 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 4a5b3c3..edfd2d4 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 e8a4ebc..a0863ad 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 a872f4b..fe7bdab 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 \
-- 
2.7.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]