Sync disks on reboot

This commit is contained in:
Mark
2020-07-26 23:12:40 +03:00
parent 040b94499c
commit 3b1ca6b978
+4
View File
@@ -4,6 +4,7 @@
#include "arch/amd64/hw/irq.h"
#include "arch/amd64/hw/idt.h"
#include "arch/amd64/cpu.h"
#include "sys/block/blk.h"
#include "user/signum.h"
#include "user/reboot.h"
#include "sys/reboot.h"
@@ -316,6 +317,9 @@ void sched_reboot(unsigned int cmd) {
yield();
}
kinfo("Flushing disk cache\n");
blk_sync_all();
system_power_cmd(cmd);
}