> real    16m56.160s
> user    0m0.086s
> sys     0m0.038s
>
Could you try the attached patch?



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'grub-core/kern/emu/hostdisk.c'
--- grub-core/kern/emu/hostdisk.c	2011-04-03 13:45:20 +0000
+++ grub-core/kern/emu/hostdisk.c	2011-04-03 18:07:01 +0000
@@ -629,11 +629,14 @@
 #ifdef O_LARGEFILE
   flags |= O_LARGEFILE;
 #endif
+  
 #ifdef O_SYNC
-  flags |= O_SYNC;
+  if ((flags & O_ACCMODE) == O_WRONLY || (flags & O_ACCMODE) == O_RDWR)
+    flags |= O_SYNC;
 #endif
 #ifdef O_FSYNC
-  flags |= O_FSYNC;
+  if ((flags & O_ACCMODE) == O_WRONLY || (flags & O_ACCMODE) == O_RDWR)
+    flags |= O_FSYNC;
 #endif
 #ifdef O_BINARY
   flags |= O_BINARY;

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to