mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-17 14:33:00 +02:00
installer: Flush all disk buffers after the installation has finished.
This commit is contained in:
@@ -969,3 +969,9 @@ int hw_write_fstab(struct hw_destination* dest) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void hw_sync() {
|
||||
sync();
|
||||
sync();
|
||||
sync();
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -676,6 +676,8 @@ EXIT:
|
||||
free(sourcedrive);
|
||||
|
||||
if (destination) {
|
||||
hw_sync();
|
||||
|
||||
hw_umount_filesystems(destination, DESTINATION_MOUNT_PATH);
|
||||
free(destination);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user