From 63314aa43c47559192c10e6c89a0ce15bf834f6d Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 26 Apr 2013 23:41:13 +0200 Subject: [PATCH] * util/getroot.c (exec_pipe): Put proper #if's so that its users don't compile when not needed. --- ChangeLog | 5 +++++ util/getroot.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ddb7a854..4975a2cca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-26 Vladimir Serbinenko + + * util/getroot.c (exec_pipe): Put proper #if's so that its users don't + compile when not needed. + 2013-04-26 Vladimir Serbinenko * tests/pseries_test.in: New test. diff --git a/util/getroot.c b/util/getroot.c index ecf7ce199..2ad8a55ce 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -220,9 +220,6 @@ xgetcwd (void) #if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__) -#if (defined (__linux__) || \ - !defined (HAVE_LIBZFS) || !defined (HAVE_LIBNVPAIR)) - static pid_t exec_pipe (char **argv, int *fd) { @@ -268,8 +265,6 @@ exec_pipe (char **argv, int *fd) } } -#endif - static char ** find_root_devices_from_poolname (char *poolname) { @@ -1322,6 +1317,8 @@ grub_util_get_dev_abstraction (const char *os_dev) return GRUB_DEV_ABSTRACTION_NONE; } +#if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__) + static void pull_lvm_by_command (const char *os_dev) { @@ -1392,6 +1389,8 @@ out: free (buf); } +#endif + #ifdef __linux__ static char * get_mdadm_uuid (const char *os_dev) @@ -1615,7 +1614,9 @@ grub_util_pull_device (const char *os_dev) break; case GRUB_DEV_ABSTRACTION_LVM: +#if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__) pull_lvm_by_command (os_dev); +#endif /* Fallthrough in case that lvm-tools are unavailable. */ case GRUB_DEV_ABSTRACTION_LUKS: #ifdef HAVE_DEVICE_MAPPER