summaryrefslogtreecommitdiff
path: root/disk
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
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')
-rw-r--r--disk/part.c17
-rw-r--r--disk/part_amiga.c2
-rw-r--r--disk/part_dos.c4
-rw-r--r--disk/part_efi.c8
-rw-r--r--disk/part_iso.c8
-rw-r--r--disk/part_mac.c2
6 files changed, 21 insertions, 20 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,
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index 5a2bb718b5..5a17d11b9b 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -291,7 +291,7 @@ static struct partition_block *find_partition(struct blk_desc *dev_desc,
* Get info about a partition
*/
static int part_get_info_amiga(struct blk_desc *dev_desc, int part,
- disk_partition_t *info)
+ struct disk_partition *info)
{
struct partition_block *p = find_partition(dev_desc, part-1);
struct amiga_part_geometry *g;
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 813379f851..6e2a11090c 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -213,7 +213,7 @@ static void print_partition_extended(struct blk_desc *dev_desc,
static int part_get_info_extended(struct blk_desc *dev_desc,
lbaint_t ext_part_sector, lbaint_t relative,
int part_num, int which_part,
- disk_partition_t *info, unsigned int disksig)
+ struct disk_partition *info, uint disksig)
{
ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
dos_partition_t *pt;
@@ -317,7 +317,7 @@ void part_print_dos(struct blk_desc *dev_desc)
}
int part_get_info_dos(struct blk_desc *dev_desc, int part,
- disk_partition_t *info)
+ struct disk_partition *info)
{
return part_get_info_extended(dev_desc, 0, 0, 1, part, info, 0);
}
diff --git a/disk/part_efi.c b/disk/part_efi.c
index de15a37cd5..6b206ddb4f 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -259,7 +259,7 @@ void part_print_efi(struct blk_desc *dev_desc)
}
int part_get_info_efi(struct blk_desc *dev_desc, int part,
- disk_partition_t *info)
+ struct disk_partition *info)
{
ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz);
gpt_entry *gpt_pte = NULL;
@@ -413,7 +413,7 @@ int write_gpt_table(struct blk_desc *dev_desc,
int gpt_fill_pte(struct blk_desc *dev_desc,
gpt_header *gpt_h, gpt_entry *gpt_e,
- disk_partition_t *partitions, int parts)
+ struct disk_partition *partitions, int parts)
{
lbaint_t offset = (lbaint_t)le64_to_cpu(gpt_h->first_usable_lba);
lbaint_t last_usable_lba = (lbaint_t)
@@ -603,7 +603,7 @@ int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h,
}
int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid,
- disk_partition_t *partitions, int parts_count)
+ struct disk_partition *partitions, int parts_count)
{
gpt_header *gpt_h;
gpt_entry *gpt_e;
@@ -698,7 +698,7 @@ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head,
}
int gpt_verify_partitions(struct blk_desc *dev_desc,
- disk_partition_t *partitions, int parts,
+ struct disk_partition *partitions, int parts,
gpt_header *gpt_head, gpt_entry **gpt_pte)
{
char efi_str[PARTNAME_SZ + 1];
diff --git a/disk/part_iso.c b/disk/part_iso.c
index 4f14c9a56e..2ccb7867c9 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -47,7 +47,7 @@ unsigned long iso_dread(struct blk_desc *block_dev, lbaint_t start,
/* only boot records will be listed as valid partitions */
int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num,
- disk_partition_t *info, int verb)
+ struct disk_partition *info, int verb)
{
int i,offset,entry_num;
unsigned short *chksumbuf;
@@ -200,14 +200,14 @@ found:
}
static int part_get_info_iso(struct blk_desc *dev_desc, int part_num,
- disk_partition_t *info)
+ struct disk_partition *info)
{
return part_get_info_iso_verb(dev_desc, part_num, info, 0);
}
static void part_print_iso(struct blk_desc *dev_desc)
{
- disk_partition_t info;
+ struct disk_partition info;
int i;
if (part_get_info_iso_verb(dev_desc, 1, &info, 0) == -1) {
@@ -226,7 +226,7 @@ static void part_print_iso(struct blk_desc *dev_desc)
static int part_test_iso(struct blk_desc *dev_desc)
{
- disk_partition_t info;
+ struct disk_partition info;
return part_get_info_iso_verb(dev_desc, 1, &info, 0);
}
diff --git a/disk/part_mac.c b/disk/part_mac.c
index 8b2c004027..fbd0ad73e3 100644
--- a/disk/part_mac.c
+++ b/disk/part_mac.c
@@ -214,7 +214,7 @@ static int part_mac_read_pdb(struct blk_desc *dev_desc, int part,
}
static int part_get_info_mac(struct blk_desc *dev_desc, int part,
- disk_partition_t *info)
+ struct disk_partition *info)
{
ALLOC_CACHE_ALIGN_BUFFER(mac_driver_desc_t, ddesc, 1);
ALLOC_CACHE_ALIGN_BUFFER(mac_partition_t, mpart, 1);