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:
parent
0e26af97a6
commit
e3548c3624
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue