hosted: call 'sync' before poweroff

Might be needed to avoid filesystem corruption with buggy OF kernels.

Change-Id: I589eec6c1536beccf849716f11204b4b83a942a1
This commit is contained in:
Aidan MacDonald 2022-03-16 00:07:48 +00:00 committed by Solomon Peachy
parent a9e02b4850
commit 412dbaeffe

View file

@ -90,6 +90,7 @@ static void sig_handler(int sig, siginfo_t *siginfo, void *context)
void power_off(void)
{
backlight_hw_off();
sync();
system("/sbin/poweroff");
while (1); /* halt */
}