summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/firmware_flash.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/firmware_flash.c b/apps/plugins/firmware_flash.c
index 6a0a799a11..10b4145edd 100644
--- a/apps/plugins/firmware_flash.c
+++ b/apps/plugins/firmware_flash.c
@@ -44,6 +44,10 @@
44#define ID_PLAYER 2 44#define ID_PLAYER 2
45#define ID_REC_V2 3 45#define ID_REC_V2 3
46 46
47/* We should never check for ARCHOS_* defines in source code. We must
48 check for features/hardware that have been defined in config-*.h files.
49 This makes it easier for us to maintain portability. */
50
47#if defined(ARCHOS_PLAYER) 51#if defined(ARCHOS_PLAYER)
48#define FILE_TYPE "player" 52#define FILE_TYPE "player"
49#define KEEP VERSION_ADR /* keep the firmware version */ 53#define KEEP VERSION_ADR /* keep the firmware version */
@@ -61,7 +65,7 @@
61#define KEEP MASK_ADR /* keep the mask value */ 65#define KEEP MASK_ADR /* keep the mask value */
62#define PLATFORM_ID ID_FM 66#define PLATFORM_ID ID_FM
63#else 67#else
64#error ("No known platform given!") 68#error "No known platform given!"
65#endif 69#endif
66 70
67/* result of the CheckFirmwareFile() function */ 71/* result of the CheckFirmwareFile() function */
@@ -340,7 +344,7 @@ tCheckResult CheckFirmwareFile(char* filename, int chipsize, bool is_romless)
340 return eReadErr; 344 return eReadErr;
341 } 345 }
342 346
343 // version number in file plausible with this hardware? 347 /* version number in file plausible with this hardware? */
344 if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(sector + VERSION_ADR))) 348 if (!CheckPlatform(PLATFORM_ID, *(UINT16*)(sector + VERSION_ADR)))
345 { 349 {
346 rb->close(fd); 350 rb->close(fd);