diff options
author | Simon Glass <sjg@chromium.org> | 2020-05-10 11:39:57 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-18 17:33:33 -0400 |
commit | 0528979fa7ab7853faaf2ecf34b7721dd4c0b383 (patch) | |
tree | 2c2de398634b542e2457b2c3f857bd7006779d14 /fs | |
parent | 90526e9fbac47af16d70f323feae45d8d1b0f9b7 (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 'fs')
-rw-r--r-- | fs/btrfs/btrfs.c | 3 | ||||
-rw-r--r-- | fs/btrfs/btrfs.h | 2 | ||||
-rw-r--r-- | fs/btrfs/dev.c | 2 | ||||
-rw-r--r-- | fs/ext4/dev.c | 4 | ||||
-rw-r--r-- | fs/ext4/ext4fs.c | 2 | ||||
-rw-r--r-- | fs/fat/fat.c | 6 | ||||
-rw-r--r-- | fs/fs.c | 6 | ||||
-rw-r--r-- | fs/fs_internal.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/dev.c | 4 | ||||
-rw-r--r-- | fs/sandbox/sandboxfs.c | 2 | ||||
-rw-r--r-- | fs/ubifs/ubifs.c | 2 | ||||
-rw-r--r-- | fs/zfs/dev.c | 4 |
12 files changed, 20 insertions, 19 deletions
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c index 2e3985e385..de16217d0d 100644 --- a/fs/btrfs/btrfs.c +++ b/fs/btrfs/btrfs.c @@ -75,7 +75,8 @@ static int readdir_callback(const struct btrfs_root *root, return 0; } -int btrfs_probe(struct blk_desc *fs_dev_desc, disk_partition_t *fs_partition) +int btrfs_probe(struct blk_desc *fs_dev_desc, + struct disk_partition *fs_partition) { btrfs_blk_desc = fs_dev_desc; btrfs_part_info = fs_partition; diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h index 986d078679..25a8cf6a87 100644 --- a/fs/btrfs/btrfs.h +++ b/fs/btrfs/btrfs.h @@ -36,7 +36,7 @@ static inline u64 btrfs_name_hash(const char *name, int len) /* dev.c */ extern struct blk_desc *btrfs_blk_desc; -extern disk_partition_t *btrfs_part_info; +extern struct disk_partition *btrfs_part_info; int btrfs_devread(u64, int, void *); diff --git a/fs/btrfs/dev.c b/fs/btrfs/dev.c index ada3800f1e..e686abc5e3 100644 --- a/fs/btrfs/dev.c +++ b/fs/btrfs/dev.c @@ -10,7 +10,7 @@ #include <fs_internal.h> struct blk_desc *btrfs_blk_desc; -disk_partition_t *btrfs_part_info; +struct disk_partition *btrfs_part_info; int btrfs_devread(u64 address, int byte_len, void *buf) { diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c index 29076880bc..0d4f756aa5 100644 --- a/fs/ext4/dev.c +++ b/fs/ext4/dev.c @@ -33,9 +33,9 @@ lbaint_t part_offset; static struct blk_desc *ext4fs_blk_desc; -static disk_partition_t *part_info; +static struct disk_partition *part_info; -void ext4fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info) +void ext4fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info) { assert(rbdd->blksz == (1 << rbdd->log2blksz)); ext4fs_blk_desc = rbdd; diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index 96ca276839..ad71f5ab6e 100644 --- a/fs/ext4/ext4fs.c +++ b/fs/ext4/ext4fs.c @@ -227,7 +227,7 @@ int ext4fs_read(char *buf, loff_t offset, loff_t len, loff_t *actread) } int ext4fs_probe(struct blk_desc *fs_dev_desc, - disk_partition_t *fs_partition) + struct disk_partition *fs_partition) { ext4fs_set_blk_dev(fs_dev_desc, fs_partition); diff --git a/fs/fat/fat.c b/fs/fat/fat.c index f68c8f73c4..425d877c74 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -36,7 +36,7 @@ static void downcase(char *str, size_t len) } static struct blk_desc *cur_dev; -static disk_partition_t cur_part_info; +static struct disk_partition cur_part_info; #define DOS_BOOT_MAGIC_OFFSET 0x1fe #define DOS_FS_TYPE_OFFSET 0x36 @@ -57,7 +57,7 @@ static int disk_read(__u32 block, __u32 nr_blocks, void *buf) return ret; } -int fat_set_blk_dev(struct blk_desc *dev_desc, disk_partition_t *info) +int fat_set_blk_dev(struct blk_desc *dev_desc, struct disk_partition *info) { ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); @@ -88,7 +88,7 @@ int fat_set_blk_dev(struct blk_desc *dev_desc, disk_partition_t *info) int fat_register_device(struct blk_desc *dev_desc, int part_no) { - disk_partition_t info; + struct disk_partition info; /* First close any currently found FAT filesystem */ cur_dev = NULL; @@ -24,11 +24,11 @@ DECLARE_GLOBAL_DATA_PTR; static struct blk_desc *fs_dev_desc; static int fs_dev_part; -static disk_partition_t fs_partition; +static struct disk_partition fs_partition; static int fs_type = FS_TYPE_ANY; static inline int fs_probe_unsupported(struct blk_desc *fs_dev_desc, - disk_partition_t *fs_partition) + struct disk_partition *fs_partition) { printf("** Unrecognized filesystem type **\n"); return -1; @@ -135,7 +135,7 @@ struct fstype_info { */ bool null_dev_desc_ok; int (*probe)(struct blk_desc *fs_dev_desc, - disk_partition_t *fs_partition); + struct disk_partition *fs_partition); int (*ls)(const char *dirname); int (*exists)(const char *filename); int (*size)(const char *filename, loff_t *size); diff --git a/fs/fs_internal.c b/fs/fs_internal.c index d369c43ca6..1ff804d13b 100644 --- a/fs/fs_internal.c +++ b/fs/fs_internal.c @@ -10,7 +10,7 @@ #include <part.h> #include <memalign.h> -int fs_devread(struct blk_desc *blk, disk_partition_t *partition, +int fs_devread(struct blk_desc *blk, struct disk_partition *partition, lbaint_t sector, int byte_offset, int byte_len, char *buf) { unsigned block_len; diff --git a/fs/reiserfs/dev.c b/fs/reiserfs/dev.c index c6b67795df..5d9c26489a 100644 --- a/fs/reiserfs/dev.c +++ b/fs/reiserfs/dev.c @@ -12,10 +12,10 @@ #include "reiserfs_private.h" static struct blk_desc *reiserfs_blk_desc; -static disk_partition_t *part_info; +static struct disk_partition *part_info; -void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info) +void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info) { reiserfs_blk_desc = rbdd; part_info = info; diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c index af47224b6c..5851fe2434 100644 --- a/fs/sandbox/sandboxfs.c +++ b/fs/sandbox/sandboxfs.c @@ -8,7 +8,7 @@ #include <malloc.h> #include <os.h> -int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info) +int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info) { /* * Only accept a NULL struct blk_desc for the sandbox, which is when diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index e097d28444..742c2f47eb 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -549,7 +549,7 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename) return 0; } -int ubifs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info) +int ubifs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info) { if (rbdd) { debug("UBIFS cannot be used with normal block devices\n"); diff --git a/fs/zfs/dev.c b/fs/zfs/dev.c index 3cdb9e03ed..251e7d1f74 100644 --- a/fs/zfs/dev.c +++ b/fs/zfs/dev.c @@ -14,9 +14,9 @@ #include <zfs_common.h> static struct blk_desc *zfs_blk_desc; -static disk_partition_t *part_info; +static struct disk_partition *part_info; -void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info) +void zfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info) { zfs_blk_desc = rbdd; part_info = info; |