forked from len0rd/rockbox
Properly handle early USB mode, dircache and tagcache state files with
flashed rockbox. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10525 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1204136632
commit
3b52bb9c68
5 changed files with 37 additions and 17 deletions
|
@ -84,7 +84,17 @@ bool detect_flashed_rockbox(void)
|
|||
struct flash_header hdr;
|
||||
uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT;
|
||||
|
||||
# ifndef BOOTLOADER
|
||||
int oldmode;
|
||||
oldmode = system_memory_guard(MEMGUARD_NONE);
|
||||
# endif
|
||||
|
||||
memcpy(&hdr, src, sizeof(struct flash_header));
|
||||
|
||||
# ifndef BOOTLOADER
|
||||
system_memory_guard(oldmode);
|
||||
# endif
|
||||
|
||||
if (hdr.magic != FLASH_MAGIC)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue