Add a simple sanity check before checking for changed binary.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23753 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cfda097394
commit
f2f5b7c851
1 changed files with 10 additions and 0 deletions
10
apps/misc.c
10
apps/misc.c
|
@ -609,9 +609,19 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
|
|||
#endif
|
||||
#ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN
|
||||
case SYS_FS_CHANGED:
|
||||
{
|
||||
/* simple sanity: assume rockbox is on the first hotswappable
|
||||
* driver, abort out if that one isn't inserted */
|
||||
int i;
|
||||
for (i = 0; i < NUM_DRIVES; i++)
|
||||
{
|
||||
if (storage_removable(i) && !storage_present(i))
|
||||
return SYS_FS_CHANGED;
|
||||
}
|
||||
system_flush();
|
||||
check_bootfile(true); /* state gotten in main.c:init() */
|
||||
system_restore();
|
||||
}
|
||||
return SYS_FS_CHANGED;
|
||||
#endif
|
||||
#ifdef HAVE_HEADPHONE_DETECTION
|
||||
|
|
Loading…
Reference in a new issue