summaryrefslogtreecommitdiff
path: root/disk/part_dos.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-29 15:25:51 -0700
committerSimon Glass <sjg@chromium.org>2016-03-14 15:34:50 -0600
commitbcce53d048de7f41078d25e39aa2f26d752d3658 (patch)
tree5eb88ab671c7ec923cfb4fe9c0d3dc4715adb93d /disk/part_dos.c
parent782b97805e9f59cc2b4d3aa67a8a03248e8cd722 (diff)
dm: block: Rename device number member dev to devnum
This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'disk/part_dos.c')
-rw-r--r--disk/part_dos.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 4a56391de7e..5f8d949b84c 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -114,7 +114,7 @@ static void print_partition_extended(struct blk_desc *dev_desc,
if (dev_desc->block_read(dev_desc, ext_part_sector, 1,
(ulong *)buffer) != 1) {
printf ("** Can't read partition table on %d:" LBAFU " **\n",
- dev_desc->dev, ext_part_sector);
+ dev_desc->devnum, ext_part_sector);
return;
}
i=test_block_type(buffer);
@@ -180,7 +180,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
if (dev_desc->block_read(dev_desc, ext_part_sector, 1,
(ulong *)buffer) != 1) {
printf ("** Can't read partition table on %d:" LBAFU " **\n",
- dev_desc->dev, ext_part_sector);
+ dev_desc->devnum, ext_part_sector);
return -1;
}
if (buffer[DOS_PART_MAGIC_OFFSET] != 0x55 ||
@@ -215,24 +215,29 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
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);
+ sprintf((char *)info->name, "hd%c%d",
+ 'a' + dev_desc->devnum,
+ part_num);
break;
case IF_TYPE_SCSI:
- sprintf ((char *)info->name, "sd%c%d",
- 'a' + dev_desc->dev, part_num);
+ sprintf((char *)info->name, "sd%c%d",
+ 'a' + dev_desc->devnum,
+ part_num);
break;
case IF_TYPE_USB:
- sprintf ((char *)info->name, "usbd%c%d",
- 'a' + dev_desc->dev, part_num);
+ sprintf((char *)info->name, "usbd%c%d",
+ 'a' + dev_desc->devnum,
+ part_num);
break;
case IF_TYPE_DOC:
- sprintf ((char *)info->name, "docd%c%d",
- 'a' + dev_desc->dev, part_num);
+ sprintf((char *)info->name, "docd%c%d",
+ 'a' + dev_desc->devnum,
+ part_num);
break;
default:
- sprintf ((char *)info->name, "xx%c%d",
- 'a' + dev_desc->dev, part_num);
+ sprintf((char *)info->name, "xx%c%d",
+ 'a' + dev_desc->devnum,
+ part_num);
break;
}
/* sprintf(info->type, "%d, pt->sys_ind); */