From ea75312f31fb83300d1f00b9630b05fd79bb7650 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 9 May 2011 16:27:09 +0200 Subject: [PATCH] * util/grub-mkimage.c (main): Explicitely flush and sync the output before closing to ensure that it will be readable by grub-setup. --- ChangeLog | 5 +++++ util/grub-mkimage.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 540e171cc..bec788b3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-09 Vladimir Serbinenko + + * util/grub-mkimage.c (main): Explicitely flush and sync the output + before closing to ensure that it will be readable by grub-setup. + 2011-05-05 Vladimir Serbinenko * grub-core/loader/efi/appleloader.c (MAKE_PIWG_PATH): New macro. diff --git a/util/grub-mkimage.c b/util/grub-mkimage.c index 2ba351596..b71fb0420 100644 --- a/util/grub-mkimage.c +++ b/util/grub-mkimage.c @@ -1609,6 +1609,8 @@ main (int argc, char *argv[]) argv + optind, memdisk, config, image_target, note, comp); + fflush (fp); + fsync (fileno (fp)); fclose (fp); if (dir)