]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
installer: Flush all disk buffers after the installation has finished.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 12 Aug 2014 13:15:52 +0000 (15:15 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 12 Aug 2014 13:15:52 +0000 (15:15 +0200)
src/installer/hw.c
src/installer/hw.h
src/installer/main.c

index 52d0511817efbb92f58b8d8930f0114af8a0c736..0d5fe2fb0766eebb1b495ba8517b569301433c54 100644 (file)
@@ -969,3 +969,9 @@ int hw_write_fstab(struct hw_destination* dest) {
 
        return 0;
 }
+
+void hw_sync() {
+       sync();
+       sync();
+       sync();
+}
index 48d24bf47a7d3706087f10ab0c7b606cfa05a0a1..96fc0919bb6ff51f3fb2ff974d2c004c14d73be8 100644 (file)
@@ -124,4 +124,6 @@ int hw_stop_all_raid_arrays();
 int hw_install_bootloader(struct hw_destination* dest);
 int hw_write_fstab(struct hw_destination* dest);
 
+void hw_sync();
+
 #endif /* HEADER_HW_H */
index e3ed7957ef64857fa28d904991881a35ab14218e..ad4e0c54b21997a57ecabee59cb9850a2830b6d9 100644 (file)
@@ -676,6 +676,8 @@ EXIT:
        free(sourcedrive);
 
        if (destination) {
+               hw_sync();
+
                hw_umount_filesystems(destination, DESTINATION_MOUNT_PATH);
                free(destination);
        }