From 91e4d58001cec544f532c79cdac117651ec8cb79 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 23 Mar 2012 10:55:06 +0100 Subject: [PATCH] grub-mbr-default: sync data on disk before closing. Rebooting a VM quickly after grub-mbr-default shows that the validation is not always written down to disk when the program exits. Let's sync data on disk before exiting. --- grub-mbr-default/grub-mbr-default.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-mbr-default/grub-mbr-default.c b/grub-mbr-default/grub-mbr-default.c index e9f3958..7471d70 100644 --- a/grub-mbr-default/grub-mbr-default.c +++ b/grub-mbr-default/grub-mbr-default.c @@ -168,6 +168,7 @@ int main(int argc, char **argv) { if (!quiet) printf("Next boot entry changed to #%d\n", new_entryno); + fsync(fd); close(fd); exit(0); } -- 1.7.9.3.2.g8f78a.dirty