* util/getroot.c (exec_pipe): Put proper #if's so that its users don't

compile when not needed.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-04-26 23:41:13 +02:00
parent c1b00fffdf
commit 63314aa43c
2 changed files with 11 additions and 5 deletions

View file

@ -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> 2013-04-26 Vladimir Serbinenko <phcoder@gmail.com>
* tests/pseries_test.in: New test. * tests/pseries_test.in: New test.

View file

@ -220,9 +220,6 @@ xgetcwd (void)
#if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__) #if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__)
#if (defined (__linux__) || \
!defined (HAVE_LIBZFS) || !defined (HAVE_LIBNVPAIR))
static pid_t static pid_t
exec_pipe (char **argv, int *fd) exec_pipe (char **argv, int *fd)
{ {
@ -268,8 +265,6 @@ exec_pipe (char **argv, int *fd)
} }
} }
#endif
static char ** static char **
find_root_devices_from_poolname (char *poolname) 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; return GRUB_DEV_ABSTRACTION_NONE;
} }
#if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__)
static void static void
pull_lvm_by_command (const char *os_dev) pull_lvm_by_command (const char *os_dev)
{ {
@ -1392,6 +1389,8 @@ out:
free (buf); free (buf);
} }
#endif
#ifdef __linux__ #ifdef __linux__
static char * static char *
get_mdadm_uuid (const char *os_dev) get_mdadm_uuid (const char *os_dev)
@ -1615,7 +1614,9 @@ grub_util_pull_device (const char *os_dev)
break; break;
case GRUB_DEV_ABSTRACTION_LVM: case GRUB_DEV_ABSTRACTION_LVM:
#if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__)
pull_lvm_by_command (os_dev); pull_lvm_by_command (os_dev);
#endif
/* Fallthrough in case that lvm-tools are unavailable. */ /* Fallthrough in case that lvm-tools are unavailable. */
case GRUB_DEV_ABSTRACTION_LUKS: case GRUB_DEV_ABSTRACTION_LUKS:
#ifdef HAVE_DEVICE_MAPPER #ifdef HAVE_DEVICE_MAPPER