summaryrefslogtreecommitdiff
path: root/disk/part.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 11:39:57 -0600
committerTom Rini <trini@konsulko.com>2020-05-18 17:33:33 -0400
commit0528979fa7ab7853faaf2ecf34b7721dd4c0b383 (patch)
tree2c2de398634b542e2457b2c3f857bd7006779d14 /disk/part.c
parent90526e9fbac47af16d70f323feae45d8d1b0f9b7 (diff)
part: Drop disk_partition_t typedef
We should not be using typedefs and these make it harder to use forward declarations (to reduce header file inclusions). Drop the typedef. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'disk/part.c')
-rw-r--r--disk/part.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/disk/part.c b/disk/part.c
index 4cc2fc19f7..68cba61c5a 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -318,7 +318,7 @@ void part_print(struct blk_desc *dev_desc)
#endif /* CONFIG_HAVE_BLOCK_DEVICE */
int part_get_info(struct blk_desc *dev_desc, int part,
- disk_partition_t *info)
+ struct disk_partition *info)
{
#ifdef CONFIG_HAVE_BLOCK_DEVICE
struct part_driver *drv;
@@ -351,7 +351,8 @@ int part_get_info(struct blk_desc *dev_desc, int part,
return -1;
}
-int part_get_info_whole_disk(struct blk_desc *dev_desc, disk_partition_t *info)
+int part_get_info_whole_disk(struct blk_desc *dev_desc,
+ struct disk_partition *info)
{
info->start = 0;
info->size = dev_desc->lba;
@@ -431,7 +432,7 @@ cleanup:
#define PART_AUTO -1
int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
struct blk_desc **dev_desc,
- disk_partition_t *info, int allow_whole_dev)
+ struct disk_partition *info, int allow_whole_dev)
{
int ret = -1;
const char *part_str;
@@ -441,7 +442,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
char *ep;
int p;
int part;
- disk_partition_t tmpinfo;
+ struct disk_partition tmpinfo;
#ifdef CONFIG_SANDBOX
/*
@@ -646,7 +647,7 @@ cleanup:
}
int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
- disk_partition_t *info, int part_type)
+ struct disk_partition *info, int part_type)
{
struct part_driver *part_drv;
int ret;
@@ -671,7 +672,7 @@ int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
}
int part_get_info_by_name(struct blk_desc *dev_desc, const char *name,
- disk_partition_t *info)
+ struct disk_partition *info)
{
return part_get_info_by_name_type(dev_desc, name, info, PART_TYPE_ALL);
}
@@ -693,7 +694,7 @@ int part_get_info_by_name(struct blk_desc *dev_desc, const char *name,
static int part_get_info_by_dev_and_name(const char *dev_iface,
const char *dev_part_str,
struct blk_desc **dev_desc,
- disk_partition_t *part_info)
+ struct disk_partition *part_info)
{
char *ep;
const char *part_str;
@@ -725,7 +726,7 @@ static int part_get_info_by_dev_and_name(const char *dev_iface,
int part_get_info_by_dev_and_name_or_num(const char *dev_iface,
const char *dev_part_str,
struct blk_desc **dev_desc,
- disk_partition_t *part_info)
+ struct disk_partition *part_info)
{
/* Split the part_name if passed as "$dev_num#part_name". */
if (!part_get_info_by_dev_and_name(dev_iface, dev_part_str,