]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/emu/hostdisk.c (grub_util_check_file_presence): Use
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 28 Oct 2013 01:17:56 +0000 (02:17 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 28 Oct 2013 01:17:56 +0000 (02:17 +0100)
windows method on other platforms without good stat as well.

ChangeLog
grub-core/kern/emu/hostdisk.c

index d6f0781968afa18dbf5635e2858fffbe1b8afbdd..bdd2c80c182699b5b2a9a70dddf81acad21e35f8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-28  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/kern/emu/hostdisk.c (grub_util_check_file_presence): Use
+       windows method on other platforms without good stat as well.
+
 2013-10-28  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/osdep/linux/getroot.c: Add new btrfs defines.
index 81cf408ef1d718be2a7eb8b2137d29646f1156a7..0121cc113cd602e8851989c70b9cf6055668749d 100644 (file)
@@ -398,12 +398,12 @@ static struct grub_disk_dev grub_util_biosdisk_dev =
 static int
 grub_util_check_file_presence (const char *p)
 {
-#if defined (__MINGW32__) || defined(__CYGWIN__)
-  HANDLE h;
+#if !GRUB_UTIL_FD_STAT_IS_FUNCTIONAL
+  grub_util_fd_t h;
   h = grub_util_fd_open (p, GRUB_UTIL_FD_O_RDONLY);
   if (!GRUB_UTIL_FD_IS_VALID(h))
     return 0;
-  CloseHandle (h);
+  grub_util_fd_close (h);
   return 1;
 #else
   struct stat st;