diff options
Diffstat (limited to 'firmware/system.c')
-rw-r--r-- | firmware/system.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/system.c b/firmware/system.c index bb09dbcd59..c635254a8a 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -84,7 +84,17 @@ bool detect_flashed_rockbox(void) | |||
84 | struct flash_header hdr; | 84 | struct flash_header hdr; |
85 | uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT; | 85 | uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT; |
86 | 86 | ||
87 | # ifndef BOOTLOADER | ||
88 | int oldmode; | ||
89 | oldmode = system_memory_guard(MEMGUARD_NONE); | ||
90 | # endif | ||
91 | |||
87 | memcpy(&hdr, src, sizeof(struct flash_header)); | 92 | memcpy(&hdr, src, sizeof(struct flash_header)); |
93 | |||
94 | # ifndef BOOTLOADER | ||
95 | system_memory_guard(oldmode); | ||
96 | # endif | ||
97 | |||
88 | if (hdr.magic != FLASH_MAGIC) | 98 | if (hdr.magic != FLASH_MAGIC) |
89 | return false; | 99 | return false; |
90 | 100 | ||