mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
Accept both 0x0b and 0x0c as valid FAT32 partition types in the partition table
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14435 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1c69293d91
commit
ec3db3860e
1 changed files with 5 additions and 3 deletions
|
|
@ -317,7 +317,7 @@ static int sansa_seek_and_read(struct sansa_t* sansa, loff_t pos, unsigned char*
|
||||||
/* We identify an E200 based on the following criteria:
|
/* We identify an E200 based on the following criteria:
|
||||||
|
|
||||||
1) Exactly two partitions;
|
1) Exactly two partitions;
|
||||||
2) First partition is type "W95 FAT32" (0x0b);
|
2) First partition is type "W95 FAT32" (0x0b or 0x0c);
|
||||||
3) Second partition is type "OS/2 hidden C: drive" (0x84);
|
3) Second partition is type "OS/2 hidden C: drive" (0x84);
|
||||||
4) The "PPBL" string appears at offset 0 in the 2nd partition;
|
4) The "PPBL" string appears at offset 0 in the 2nd partition;
|
||||||
5) The "PPMI" string appears at offset PPMI_OFFSET in the 2nd partition.
|
5) The "PPMI" string appears at offset PPMI_OFFSET in the 2nd partition.
|
||||||
|
|
@ -330,8 +330,10 @@ int is_e200(struct sansa_t* sansa)
|
||||||
|
|
||||||
/* Check partition layout */
|
/* Check partition layout */
|
||||||
|
|
||||||
if ((sansa->pinfo[0].type != 0x0b) || (sansa->pinfo[1].type != 0x84) ||
|
if (((sansa->pinfo[0].type != 0x0b) && (sansa->pinfo[0].type != 0x0c)) ||
|
||||||
(sansa->pinfo[2].type != 0x00) || (sansa->pinfo[3].type != 0x00)) {
|
(sansa->pinfo[1].type != 0x84) ||
|
||||||
|
(sansa->pinfo[2].type != 0x00) ||
|
||||||
|
(sansa->pinfo[3].type != 0x00)) {
|
||||||
/* Bad partition layout, abort */
|
/* Bad partition layout, abort */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue