installer: Flush all disk buffers after the installation has finished.

This commit is contained in:
Michael Tremer
2014-08-12 15:15:52 +02:00
parent 7b4790d3fc
commit 282ec35e9b
3 changed files with 10 additions and 0 deletions

View File

@@ -969,3 +969,9 @@ int hw_write_fstab(struct hw_destination* dest) {
return 0;
}
void hw_sync() {
sync();
sync();
sync();
}

View 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 */

View File

@@ -676,6 +676,8 @@ EXIT:
free(sourcedrive);
if (destination) {
hw_sync();
hw_umount_filesystems(destination, DESTINATION_MOUNT_PATH);
free(destination);
}