- (is_extended(pt->sys_ind) == 0)) {
- info->blksz = 512;
- info->start = ext_part_sector + le32_to_int (pt->start4);
- info->size = le32_to_int (pt->size4);
- switch(dev_desc->if_type) {
- case IF_TYPE_IDE:
- case IF_TYPE_SATA:
- case IF_TYPE_ATAPI:
- sprintf ((char *)info->name, "hd%c%d",
- 'a' + dev_desc->dev, part_num);
- break;
- case IF_TYPE_SCSI:
- sprintf ((char *)info->name, "sd%c%d",
- 'a' + dev_desc->dev, part_num);
- break;
- case IF_TYPE_USB:
- sprintf ((char *)info->name, "usbd%c%d",
- 'a' + dev_desc->dev, part_num);
- break;
- case IF_TYPE_DOC:
- sprintf ((char *)info->name, "docd%c%d",
- 'a' + dev_desc->dev, part_num);
- break;
- default:
- sprintf ((char *)info->name, "xx%c%d",
- 'a' + dev_desc->dev, part_num);
- break;
- }
+ (ext_part_sector == 0 || is_extended(pt->sys_ind) == 0)) {
+ info->blksz = DOS_PART_DEFAULT_SECTOR;
+ info->start = (lbaint_t)(ext_part_sector +
+ le32_to_int(pt->start4));
+ info->size = (lbaint_t)le32_to_int(pt->size4);
+ part_set_generic_name(dev_desc, part_num,
+ (char *)info->name);