diff --git a/sys/sched.c b/sys/sched.c index 2769f82..20532fa 100644 --- a/sys/sched.c +++ b/sys/sched.c @@ -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); }