summaryrefslogtreecommitdiff
path: root/cmd
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 /cmd
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 'cmd')
-rw-r--r--cmd/ab_select.c2
-rw-r--r--cmd/bcb.c4
-rw-r--r--cmd/disk.c2
-rw-r--r--cmd/fat.c4
-rw-r--r--cmd/gpt.c17
-rw-r--r--cmd/part.c6
-rw-r--r--cmd/read.c2
-rw-r--r--cmd/reiser.c4
-rw-r--r--cmd/usb_mass_storage.c2
-rw-r--r--cmd/zfs.c4
10 files changed, 24 insertions, 23 deletions
diff --git a/cmd/ab_select.c b/cmd/ab_select.c
index 7c8f2ee8eb..d0d957d4f9 100644
--- a/cmd/ab_select.c
+++ b/cmd/ab_select.c
@@ -11,7 +11,7 @@ static int do_ab_select(cmd_tbl_t *cmdtp, int flag, int argc,
{
int ret;
struct blk_desc *dev_desc;
- disk_partition_t part_info;
+ struct disk_partition part_info;
char slot[2];
if (argc != 4)
diff --git a/cmd/bcb.c b/cmd/bcb.c
index 9626f2c69e..62f9a44e38 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -112,7 +112,7 @@ static int do_bcb_load(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
struct blk_desc *desc;
- disk_partition_t info;
+ struct disk_partition info;
u64 cnt;
char *endp;
int part, ret;
@@ -252,7 +252,7 @@ static int do_bcb_store(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
struct blk_desc *desc;
- disk_partition_t info;
+ struct disk_partition info;
u64 cnt;
int ret;
diff --git a/cmd/disk.c b/cmd/disk.c
index 15973b7d13..9e008a3889 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -16,7 +16,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
int part;
ulong addr = CONFIG_SYS_LOAD_ADDR;
ulong cnt;
- disk_partition_t info;
+ struct disk_partition info;
#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
image_header_t *hdr;
#endif
diff --git a/cmd/fat.c b/cmd/fat.c
index 28fca501fa..854fe274bc 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -64,7 +64,7 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
{
int dev, part;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
if (argc < 2) {
printf("usage: fatinfo <interface> [<dev[:part]>]\n");
@@ -101,7 +101,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
unsigned long count;
long offset;
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
int dev = 0;
int part = 1;
void *buf;
diff --git a/cmd/gpt.c b/cmd/gpt.c
index 98c788e757..f2b1ad5489 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -189,7 +189,8 @@ static void del_gpt_info(void)
}
}
-static struct disk_part *allocate_disk_part(disk_partition_t *info, int partnum)
+static struct disk_part *allocate_disk_part(struct disk_partition *info,
+ int partnum)
{
struct disk_part *newpart;
newpart = calloc(1, sizeof(struct disk_part));
@@ -310,7 +311,7 @@ static int get_gpt_info(struct blk_desc *dev_desc)
{
/* start partition numbering at 1, as U-Boot does */
int valid_parts = 0, p, ret;
- disk_partition_t info;
+ struct disk_partition info;
struct disk_part *new_disk_part;
/*
@@ -375,14 +376,14 @@ static int do_get_gpt_info(struct blk_desc *dev_desc)
static int set_gpt_info(struct blk_desc *dev_desc,
const char *str_part,
char **str_disk_guid,
- disk_partition_t **partitions,
+ struct disk_partition **partitions,
u8 *parts_count)
{
char *tok, *str, *s;
int i;
char *val, *p;
int p_count;
- disk_partition_t *parts;
+ struct disk_partition *parts;
int errno = 0;
uint64_t size_ll, start_ll;
lbaint_t offset = 0;
@@ -440,7 +441,7 @@ static int set_gpt_info(struct blk_desc *dev_desc,
}
/* allocate memory for partitions */
- parts = calloc(sizeof(disk_partition_t), p_count);
+ parts = calloc(sizeof(struct disk_partition), p_count);
if (parts == NULL)
return -ENOMEM;
@@ -557,7 +558,7 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part)
int ret;
char *str_disk_guid;
u8 part_count = 0;
- disk_partition_t *partitions = NULL;
+ struct disk_partition *partitions = NULL;
/* fill partitions */
ret = set_gpt_info(blk_dev_desc, str_part,
@@ -584,7 +585,7 @@ static int gpt_verify(struct blk_desc *blk_dev_desc, const char *str_part)
{
ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1,
blk_dev_desc->blksz);
- disk_partition_t *partitions = NULL;
+ struct disk_partition *partitions = NULL;
gpt_entry *gpt_pte = NULL;
char *str_disk_guid;
u8 part_count = 0;
@@ -640,7 +641,7 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm,
{
struct list_head *pos;
struct disk_part *curr;
- disk_partition_t *new_partitions = NULL;
+ struct disk_partition *new_partitions = NULL;
char disk_guid[UUID_STR_LEN + 1];
char *partitions_list, *str_disk_guid = NULL;
u8 part_count = 0;
diff --git a/cmd/part.c b/cmd/part.c
index 5e4e45ca6d..4b2e06e615 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -32,7 +32,7 @@ static int do_part_uuid(int argc, char * const argv[])
{
int part;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
if (argc < 2)
return CMD_RET_USAGE;
@@ -90,7 +90,7 @@ static int do_part_list(int argc, char * const argv[])
if (var != NULL) {
int p;
char str[512] = { '\0', };
- disk_partition_t info;
+ struct disk_partition info;
for (p = 1; p < MAX_SEARCH_PARTITIONS; p++) {
char t[5];
@@ -117,7 +117,7 @@ static int do_part_list(int argc, char * const argv[])
static int do_part_info(int argc, char * const argv[], enum cmd_part_info param)
{
struct blk_desc *desc;
- disk_partition_t info;
+ struct disk_partition info;
char buf[512] = { 0 };
char *endp;
int part;
diff --git a/cmd/read.c b/cmd/read.c
index 82c2d9ad99..7977e9d847 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -18,7 +18,7 @@ int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
struct blk_desc *dev_desc = NULL;
int dev;
int part = 0;
- disk_partition_t part_info;
+ struct disk_partition part_info;
ulong offset = 0u;
ulong limit = 0u;
void *addr;
diff --git a/cmd/reiser.c b/cmd/reiser.c
index 598fab48b3..28e827796b 100644
--- a/cmd/reiser.c
+++ b/cmd/reiser.c
@@ -35,7 +35,7 @@ int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
char *filename = "/";
int dev, part;
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
if (argc < 3)
return CMD_RET_USAGE;
@@ -81,7 +81,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
char *filename = NULL;
int dev, part;
ulong addr = 0, filelen;
- disk_partition_t info;
+ struct disk_partition info;
struct blk_desc *dev_desc = NULL;
unsigned long count;
char *addr_str;
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index c5c6899787..52ff637e2f 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -55,7 +55,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
{
char *s, *t, *devnum_part_str, *name;
struct blk_desc *block_dev;
- disk_partition_t info;
+ struct disk_partition info;
int partnum;
int ret = -1;
struct ums *ums_new;
diff --git a/cmd/zfs.c b/cmd/zfs.c
index 9c237a5758..2b622a8f53 100644
--- a/cmd/zfs.c
+++ b/cmd/zfs.c
@@ -38,7 +38,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
int dev;
int part;
ulong addr = 0;
- disk_partition_t info;
+ struct disk_partition info;
struct blk_desc *dev_desc;
unsigned long count;
const char *addr_str;
@@ -135,7 +135,7 @@ static int do_zfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
const char *filename = "/";
int part;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
struct device_s vdev;
if (argc < 2)