diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-11-25 22:54:36 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-11-25 22:54:36 +0000 |
commit | cfda097394d752fde3b75ec2561ba752cd682e54 (patch) | |
tree | e7e8c59e2ae0937b5b50d8c005984d3431a06c00 /apps/misc.c | |
parent | 6c62b1bf3d0279c0b1270e897307ae7c45924608 (diff) | |
download | rockbox-cfda097394d752fde3b75ec2561ba752cd682e54.tar.gz rockbox-cfda097394d752fde3b75ec2561ba752cd682e54.zip |
Add HAVE_HOTSWAP_STORAGE_AS_MAIN to detect changed binary after re-inserting the storage on targets that run rockbox from hotswappable storage.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23752 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/misc.c b/apps/misc.c index 6677c5f9b9..307592e346 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -79,7 +79,8 @@ | |||
79 | #include "playback.h" | 79 | #include "playback.h" |
80 | 80 | ||
81 | #ifdef BOOTFILE | 81 | #ifdef BOOTFILE |
82 | #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) | 82 | #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) \ |
83 | || defined(HAVE_HOTSWAP_STORAGE_AS_MAIN) | ||
83 | #include "rolo.h" | 84 | #include "rolo.h" |
84 | #endif | 85 | #endif |
85 | #endif | 86 | #endif |
@@ -606,6 +607,13 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
606 | audio_resume(); | 607 | audio_resume(); |
607 | return SYS_CAR_ADAPTER_RESUME; | 608 | return SYS_CAR_ADAPTER_RESUME; |
608 | #endif | 609 | #endif |
610 | #ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN | ||
611 | case SYS_FS_CHANGED: | ||
612 | system_flush(); | ||
613 | check_bootfile(true); /* state gotten in main.c:init() */ | ||
614 | system_restore(); | ||
615 | return SYS_FS_CHANGED; | ||
616 | #endif | ||
609 | #ifdef HAVE_HEADPHONE_DETECTION | 617 | #ifdef HAVE_HEADPHONE_DETECTION |
610 | case SYS_PHONE_PLUGGED: | 618 | case SYS_PHONE_PLUGGED: |
611 | unplug_change(true); | 619 | unplug_change(true); |
@@ -682,7 +690,7 @@ int show_logo( void ) | |||
682 | } | 690 | } |
683 | 691 | ||
684 | #ifdef BOOTFILE | 692 | #ifdef BOOTFILE |
685 | #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) | 693 | #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) || defined(HAVE_HOTSWAP_STORAGE_AS_MAIN) |
686 | /* | 694 | /* |
687 | memorize/compare details about the BOOTFILE | 695 | memorize/compare details about the BOOTFILE |
688 | we don't use dircache because it may not be up to date after | 696 | we don't use dircache because it may not be up to date after |