From bca8873a0c7ed080a14f82bf41a7f7d74db0c0c6 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 23 Sep 2013 12:06:00 +0200 Subject: [PATCH] * util/getroot_unix.c [__MINGW32__ || __CYGWIN__]: Define dummy grub_util_pull_lvm_by_command to decrease number of #if's. --- ChangeLog | 11 +++++++++++ include/grub/emu/getroot.h | 2 +- util/getroot.c | 2 -- util/getroot_unix.c | 7 +++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54684fe51..8d95254d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2013-09-23 Vladimir Serbinenko + + * util/getroot_unix.c [__MINGW32__ || __CYGWIN__]: + Define dummy grub_util_pull_lvm_by_command to decrease number of #if's. + +2013-09-23 Vladimir Serbinenko + + * grub-core/lib/posix_wrap/sys/types.h: Use OpenBSD approach: it's + less nice but more portable. + * grub-core/lib/posix_wrap/wchar.h: Likewise. + 2013-09-23 Vladimir Serbinenko * include/grub/cryptodisk.h (grub_cryptodisk): Use grub_util_fd_t diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h index bbba7308c..8762788b7 100644 --- a/include/grub/emu/getroot.h +++ b/include/grub/emu/getroot.h @@ -79,9 +79,9 @@ grub_util_get_devmapper_grub_dev (const char *os_dev); #include pid_t grub_util_exec_pipe (char **argv, int *fd); +#endif void grub_util_pull_lvm_by_command (const char *os_dev); -#endif char ** grub_util_find_root_devices_from_poolname (char *poolname); diff --git a/util/getroot.c b/util/getroot.c index 8673ede5f..1e8bddc93 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -119,9 +119,7 @@ grub_util_pull_device (const char *os_dev) switch (ab) { case GRUB_DEV_ABSTRACTION_LVM: -#if !defined (__MINGW32__) && !defined (__CYGWIN__) grub_util_pull_lvm_by_command (os_dev); -#endif /* Fallthrough in case that lvm-tools are unavailable. */ case GRUB_DEV_ABSTRACTION_LUKS: grub_util_pull_devmapper (os_dev); diff --git a/util/getroot_unix.c b/util/getroot_unix.c index bdf60f040..079f91628 100644 --- a/util/getroot_unix.c +++ b/util/getroot_unix.c @@ -928,4 +928,11 @@ grub_util_biosdisk_is_floppy (grub_disk_t disk) return 0; } +#else + +void +grub_util_pull_lvm_by_command (const char *os_dev __attribute__ ((unused))) +{ +} + #endif