diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2010-04-03 22:18:16 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2010-04-03 22:18:16 +0000 |
commit | 2dbafc10863fda3d18745e3948d76b09a017dd65 (patch) | |
tree | b066313f8357aa938a76759d417d6e8af6135fc4 /bootloader/main-pp.c | |
parent | e07909a9c13d19c2d986206caa566eebb4c0a4f7 (diff) |
Fix some forgotten storage_(read|write)_sectors() calls
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25461 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r-- | bootloader/main-pp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index a2562f8a9d..4f1fe2a4e1 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c @@ -391,8 +391,8 @@ 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(0, pinfo->start + PPMI_SECTOR_OFFSET, - PPMI_SECTORS, &ppmi_header); + storage_read_sectors(pinfo->start + PPMI_SECTOR_OFFSET, + PPMI_SECTORS, &ppmi_header); /* The first four characters at 0x80000 (sector 1024) should be PPMI*/ if( memcmp(ppmi_header.magic, "PPMI", 4) ) @@ -401,7 +401,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(0, pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS + storage_read_sectors(pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS + (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header); /* We don't support encrypted mi4 files yet */ @@ -424,7 +424,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, printf("Binary type: %.4s", mi4header.type); /* Load firmware */ - storage_read_sectors(0, pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS + storage_read_sectors(pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS + (ppmi_header.length/512) + MI4_HEADER_SECTORS, (mi4header.mi4size-MI4_HEADER_SIZE)/512, buf); @@ -443,9 +443,9 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, printf("Disabling database rebuild"); - storage_read_sectors(0, pinfo->start + 0x3c08, 1, block); + storage_read_sectors(pinfo->start + 0x3c08, 1, block); block[0xe1] = 0; - storage_write_sectors(0, pinfo->start + 0x3c08, 1, block); + storage_write_sectors(pinfo->start + 0x3c08, 1, block); } #else (void) disable_rebuild; |