extlinux: Make sure ldlinux.sys file is installed
authorPaulo Alcantara <pcacjr@zytor.com>
Mon, 7 Jan 2013 08:14:47 +0000 (06:14 -0200)
committerMatt Fleming <matt.fleming@intel.com>
Thu, 10 Jan 2013 10:51:16 +0000 (10:51 +0000)
Due to delayed allocation feature on XFS filesystems, a write is not
guaranteed to flushed out to the underlying file system after crash or
something else - so we need to make sure that ldlinux.sys is installed
correctly in the mounted filesystem.

Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
extlinux/main.c

index 0204caa..fa54152 100644 (file)
@@ -687,6 +687,8 @@ static int xfs_install_file(const char *path, int devfd, struct stat *rst)
     }
 
     close(dirfd);
+
+    sync();
     close(fd);
 
     return 0;