1
0
Fork 0
forked from len0rd/rockbox

The sleep timer now waits until the disk is idle before shutting down

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4737 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-06-14 05:03:49 +00:00
parent 0e26af97a6
commit e3548c3624

View file

@ -339,6 +339,10 @@ static void handle_auto_poweroff(void)
else else
{ {
DEBUGF("Sleep timer timeout. Shutting off...\n"); DEBUGF("Sleep timer timeout. Shutting off...\n");
/* Make sure that the disk isn't spinning when
we cut the power */
while(ata_disk_is_active())
sleep(HZ);
power_off(); power_off();
} }
} }