]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/getroot.c (exec_pipe): Put proper #if's so that its users don't
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 26 Apr 2013 21:41:13 +0000 (23:41 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 26 Apr 2013 21:41:13 +0000 (23:41 +0200)
compile when not needed.

ChangeLog
util/getroot.c

index 5ddb7a854bebf7966923abe07d749b6ecb0835db..4975a2ccac420b1734321cda6feb5d8204fcb76b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/getroot.c (exec_pipe): Put proper #if's so that its users don't
+       compile when not needed.
+
 2013-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * tests/pseries_test.in: New test.
index ecf7ce19958ee0af9efd9b703c774dbea96f0b81..2ad8a55ced306395002142f5d8007b5eefde4856 100644 (file)
@@ -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