]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/getroot.c (grub_util_biosdisk_is_present): Don't do stat on
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 24 Sep 2013 16:58:33 +0000 (18:58 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 24 Sep 2013 16:58:33 +0000 (18:58 +0200)
platforms on which it doesn't work.

ChangeLog
util/getroot.c

index 2480a9d302bb977eb07b1fb985529f9a6da21cc2..20cfe740a6d66289db9b8530b5bc393a1b1509fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-24  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * 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  <phcoder@gmail.com>
 
        * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Move struct
index 65dee750b707141d0dd5ef1f9a22fd2e479a15a3..a165fdc0b7f13fef99aa39df6f72a3e54f00137c 100644 (file)
@@ -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;