diff --git a/ChangeLog b/ChangeLog index 2480a9d30..20cfe740a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-24 Vladimir Serbinenko + + * util/getroot.c (grub_util_biosdisk_is_present): Don't do stat on + platforms on which it doesn't work. + 2013-09-24 Vladimir Serbinenko * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Move struct diff --git a/util/getroot.c b/util/getroot.c index 65dee750b..a165fdc0b 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -462,12 +462,16 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev) int grub_util_biosdisk_is_present (const char *os_dev) { +#if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__AROS__) struct stat st; if (stat (os_dev, &st) < 0) return 0; int ret= (find_system_device (os_dev, &st, 1, 0) != NULL); +#else + int ret= (find_system_device (os_dev, NULL, 1, 0) != NULL); +#endif grub_util_info ((ret ? "%s is present" : "%s is not present"), os_dev); return ret;