summaryrefslogtreecommitdiff
path: root/disk/part_dos.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2015-12-07 11:38:48 -0700
committerTom Rini <trini@konsulko.com>2016-01-13 21:05:18 -0500
commit7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86 (patch)
tree8dfb6b9f5721891de191bad798b0533e3a0bf69a /disk/part_dos.c
parentadc421e4cee8275cd99367b3b455ffbb5ead3990 (diff)
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'disk/part_dos.c')
-rw-r--r--disk/part_dos.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 628066041bb..1e5cb330cd5 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -91,7 +91,7 @@ int test_part_dos (block_dev_desc_t *dev_desc)
{
ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
- if (dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) buffer) != 1)
+ if (dev_desc->block_read(dev_desc, 0, 1, (ulong *)buffer) != 1)
return -1;
if (test_block_type(buffer) != DOS_MBR)
@@ -111,7 +111,8 @@ static void print_partition_extended(block_dev_desc_t *dev_desc,
dos_partition_t *pt;
int i;
- if (dev_desc->block_read(dev_desc->dev, ext_part_sector, 1, (ulong *) buffer) != 1) {
+ 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);
return;
@@ -177,7 +178,8 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc,
int i;
int dos_type;
- if (dev_desc->block_read (dev_desc->dev, ext_part_sector, 1, (ulong *) buffer) != 1) {
+ 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);
return -1;