Skip to content

Commit

Permalink
block: sunxi_nand: accept type 1 partitions too
Browse files Browse the repository at this point in the history
We don't know the meaning of the values, but they are usually 0 or 2.
Except for lundman who has 1s instead of 2s, So we will accept both.
  • Loading branch information
amery committed Oct 16, 2012
1 parent 3f221cf commit 9d65b95
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/block/sunxi_nand/nfd/mbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,16 @@ int mbr2disks(struct nand_disk* disk_array)
//查找出所有的LINUX盘符
for(part_cnt = 0; part_cnt < mbr->PartCount && part_cnt < MAX_PART_COUNT; part_cnt++)
{
if((mbr->array[part_cnt].user_type == 2) || (mbr->array[part_cnt].user_type == 0))
{
PRINT("The %d disk name = %s, class name = %s, disk size = %d\n", part_index, mbr->array[part_cnt].name,
mbr->array[part_cnt].classname, mbr->array[part_cnt].lenlo);
if (mbr->array[part_cnt].user_type < 3) {
PRINT("The %d disk name = %s, type = %u, class name = %s, disk size = %d\n",
part_index,
mbr->array[part_cnt].name, mbr->array[part_cnt].user_type,
mbr->array[part_cnt].classname, mbr->array[part_cnt].lenlo);

disk_array[part_index].offset = mbr->array[part_cnt].addrlo;
disk_array[part_index].offset = mbr->array[part_cnt].addrlo;
disk_array[part_index].size = mbr->array[part_cnt].lenlo;
part_index ++;
}
}
}
disk_array[part_index - 1].size = DiskSize - mbr->array[mbr->PartCount - 1].addrlo;
_free_mbr();
Expand Down

0 comments on commit 9d65b95

Please sign in to comment.