summaryrefslogtreecommitdiffstats
path: root/tools/ipodpatcher/ipodpatcher.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-12-14 09:40:15 +0000
committerDave Chapman <dave@dchapman.com>2006-12-14 09:40:15 +0000
commit132b24163c555895263e1b55b1ed170bd04a55bb (patch)
tree394231028bdd4057980643de9e125a1d669ec40b /tools/ipodpatcher/ipodpatcher.c
parent261650536464299fab950e3796571388344a5788 (diff)
downloadrockbox-132b24163c555895263e1b55b1ed170bd04a55bb.tar.gz
rockbox-132b24163c555895263e1b55b1ed170bd04a55bb.zip
Ooops, I should compile things before committing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11761 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/ipodpatcher/ipodpatcher.c')
-rw-r--r--tools/ipodpatcher/ipodpatcher.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/ipodpatcher/ipodpatcher.c b/tools/ipodpatcher/ipodpatcher.c
index a745b92c49..fb563ac657 100644
--- a/tools/ipodpatcher/ipodpatcher.c
+++ b/tools/ipodpatcher/ipodpatcher.c
@@ -183,21 +183,21 @@ int read_partinfo(HANDLE dh, int sector_size, struct partinfo_t* pinfo)
}
/* check that the boot sector is initialized */
- if ( (sector[510] != 0x55) ||
- (sector[511] != 0xaa)) {
+ if ( (sectorbuf[510] != 0x55) ||
+ (sectorbuf[511] != 0xaa)) {
fprintf(stderr,"[ERR] Bad boot sector signature\n");
return -1;
}
- if ((memcmp(&sector[71],"iPod",4) != 0) &&
- (memcmp(&sector[0x40],"This is your Apple iPod. You probably do not want to boot from it!",66) != 0) ) {
+ if ((memcmp(&sectorbuf[71],"iPod",4) != 0) &&
+ (memcmp(&sectorbuf[0x40],"This is your Apple iPod. You probably do not want to boot from it!",66) != 0) ) {
fprintf(stderr,"[ERR] Drive is not an iPod, aborting\n");
return -1;
}
/* parse partitions */
for ( i = 0; i < 4; i++ ) {
- unsigned char* ptr = sector + 0x1be + 16*i;
+ unsigned char* ptr = sectorbuf + 0x1be + 16*i;
pinfo[i].type = ptr[4];
pinfo[i].start = BYTES2INT32(ptr, 8);
pinfo[i].size = BYTES2INT32(ptr, 12);