Ooops, I should compile things before committing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11761 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2616505364
commit
132b24163c
1 changed files with 5 additions and 5 deletions
|
@ -183,21 +183,21 @@ int read_partinfo(HANDLE dh, int sector_size, struct partinfo_t* pinfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check that the boot sector is initialized */
|
/* check that the boot sector is initialized */
|
||||||
if ( (sector[510] != 0x55) ||
|
if ( (sectorbuf[510] != 0x55) ||
|
||||||
(sector[511] != 0xaa)) {
|
(sectorbuf[511] != 0xaa)) {
|
||||||
fprintf(stderr,"[ERR] Bad boot sector signature\n");
|
fprintf(stderr,"[ERR] Bad boot sector signature\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((memcmp(§or[71],"iPod",4) != 0) &&
|
if ((memcmp(§orbuf[71],"iPod",4) != 0) &&
|
||||||
(memcmp(§or[0x40],"This is your Apple iPod. You probably do not want to boot from it!",66) != 0) ) {
|
(memcmp(§orbuf[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");
|
fprintf(stderr,"[ERR] Drive is not an iPod, aborting\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse partitions */
|
/* parse partitions */
|
||||||
for ( i = 0; i < 4; i++ ) {
|
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].type = ptr[4];
|
||||||
pinfo[i].start = BYTES2INT32(ptr, 8);
|
pinfo[i].start = BYTES2INT32(ptr, 8);
|
||||||
pinfo[i].size = BYTES2INT32(ptr, 12);
|
pinfo[i].size = BYTES2INT32(ptr, 12);
|
||||||
|
|
Loading…
Reference in a new issue