summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-11-02 01:31:52 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-11-02 01:31:52 +0000
commit86f0c75cde212262abd49c5211ce9c15babefa78 (patch)
tree54d9fb8546bc258aec4075a98970c797d237a414
parent430343bca7b2358b6862a096264fb2d16cbf0c58 (diff)
downloadrockbox-86f0c75cde212262abd49c5211ce9c15babefa78.tar.gz
rockbox-86f0c75cde212262abd49c5211ce9c15babefa78.zip
fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18976 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--bootloader/main-pp.c10
-rw-r--r--firmware/export/storage.h3
2 files changed, 6 insertions, 7 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 09e1c23ed8..692a7bdfb4 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -371,7 +371,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
unsigned long sum;
/* Read header to find out how long the mi4 file is. */
- storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET,
+ storage_read_sectors(0, pinfo->start + PPMI_SECTOR_OFFSET,
PPMI_SECTORS, &ppmi_header);
/* The first four characters at 0x80000 (sector 1024) should be PPMI*/
@@ -381,7 +381,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
printf("BL mi4 size: %x", ppmi_header.length);
/* Read mi4 header of the OF */
- storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ storage_read_sectors(0, pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header);
/* We don't support encrypted mi4 files yet */
@@ -404,7 +404,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
printf("Binary type: %.4s", mi4header.type);
/* Load firmware */
- storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ storage_read_sectors(0, pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ (ppmi_header.length/512) + MI4_HEADER_SECTORS,
(mi4header.mi4size-MI4_HEADER_SIZE)/512, buf);
@@ -423,9 +423,9 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
printf("Disabling database rebuild");
- storage_read_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block);
+ storage_read_sectors(0, pinfo->start + 0x3c08, 1, block);
block[0xe1] = 0;
- storage_write_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block);
+ storage_write_sectors(0, pinfo->start + 0x3c08, 1, block);
}
#else
(void) disable_rebuild;
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index 3c2a0e858e..68867a98b1 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -252,8 +252,7 @@ static inline void storage_get_info(int drive, struct storage_info *info)
(void)drive;
(void)info;
}
-+#endif /* NOT CONFIG_STORAGE_MULTI */
- #endif
+#endif
#ifdef HAVE_HOTSWAP
static inline bool storage_removable(int drive)