{
int res;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
u64 sz = 0;
dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
pr_debug("\n");
continue;
}
- disk_partition_t partinfo;
+ struct disk_partition partinfo;
ret = part_get_info(block_dev, part->part_id,
&partinfo);
#include <common.h>
#include <cpu_func.h>
#include <mmc.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/ioapic.h>
#include <asm/irq.h>
static void board_get_alt_info_mmc(struct udevice *dev, char *buf)
{
- disk_partition_t info;
+ struct disk_partition info;
int p, len, devnum;
bool first = true;
const char *name;
{
int ret;
struct blk_desc *dev_desc;
- disk_partition_t part_info;
+ struct disk_partition part_info;
char slot[2];
if (argc != 4)
char * const argv[])
{
struct blk_desc *desc;
- disk_partition_t info;
+ struct disk_partition info;
u64 cnt;
char *endp;
int part, ret;
char * const argv[])
{
struct blk_desc *desc;
- disk_partition_t info;
+ struct disk_partition info;
u64 cnt;
int ret;
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
{
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");
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;
}
}
-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));
{
/* 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;
/*
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;
}
/* 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;
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,
{
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;
{
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;
{
int part;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
if (argc < 2)
return CMD_RET_USAGE;
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];
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;
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;
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;
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;
{
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;
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;
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)
* @return 0 on success and a negative on error
*/
static int ab_control_create_from_disk(struct blk_desc *dev_desc,
- const disk_partition_t *part_info,
+ const struct disk_partition *part_info,
struct bootloader_control **abc)
{
ulong abc_offset, abc_blocks, ret;
* @return 0 on success and a negative on error
*/
static int ab_control_store(struct blk_desc *dev_desc,
- const disk_partition_t *part_info,
+ const struct disk_partition *part_info,
struct bootloader_control *abc)
{
ulong abc_offset, abc_blocks, ret;
return 0;
}
-int ab_select_slot(struct blk_desc *dev_desc, disk_partition_t *part_info)
+int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info)
{
struct bootloader_control *abc = NULL;
u32 crc32_le;
s32 err;
struct image_header *header;
loff_t filelen, actlen;
- disk_partition_t part_info = {};
+ struct disk_partition part_info = {};
header = spl_get_load_buffer(-sizeof(*header), sizeof(*header));
{
int err;
__maybe_unused loff_t filelen, actlen;
- disk_partition_t part_info = {};
+ struct disk_partition part_info = {};
__maybe_unused char *file;
if (part_get_info(block_dev, partition, &part_info)) {
struct mmc *mmc, int partition,
unsigned long sector)
{
- disk_partition_t info;
+ struct disk_partition info;
int err;
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
#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;
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;
#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;
char *ep;
int p;
int part;
- disk_partition_t tmpinfo;
+ struct disk_partition tmpinfo;
#ifdef CONFIG_SANDBOX
/*
}
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;
}
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);
}
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;
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,
* 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;
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;
}
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);
}
}
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;
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)
}
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;
}
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];
/* 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;
}
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) {
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);
}
}
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);
simple_strtoul(s, NULL, 0);
} else if (!strcmp(entity_type, "part")) {
- disk_partition_t partinfo;
+ struct disk_partition partinfo;
struct blk_desc *blk_dev = mmc_get_blk_desc(mmc);
int mmcdev = second_arg;
int mmcpart = third_arg;
int r;
# if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)
struct blk_desc *dev_desc;
- disk_partition_t part_info;
+ struct disk_partition part_info;
r = fastboot_mmc_get_part_info(part_name, &dev_desc, &part_info,
response);
{
int r;
struct blk_desc *dev_desc;
- disk_partition_t part_info;
+ struct disk_partition part_info;
r = fastboot_mmc_get_part_info(part_name, &dev_desc, &part_info,
response);
};
static int part_get_info_by_name_or_alias(struct blk_desc *dev_desc,
- const char *name, disk_partition_t *info)
+ const char *name, struct disk_partition *info)
{
int ret;
return blkcnt;
}
-static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t *info,
- const char *part_name, void *buffer,
- u32 download_bytes, char *response)
+static void write_raw_image(struct blk_desc *dev_desc,
+ struct disk_partition *info, const char *part_name,
+ void *buffer, u32 download_bytes, char *response)
{
lbaint_t blkcnt;
lbaint_t blks;
* @return Boot image header sectors count or 0 on error
*/
static lbaint_t fb_mmc_get_boot_header(struct blk_desc *dev_desc,
- disk_partition_t *info,
+ struct disk_partition *info,
struct andr_img_hdr *hdr,
char *response)
{
u32 kernel_sector_start;
u32 kernel_sectors;
u32 sectors_per_page;
- disk_partition_t info;
+ struct disk_partition info;
int res;
puts("Flashing zImage\n");
*
* @part_name: Named partition to lookup
* @dev_desc: Pointer to returned blk_desc pointer
- * @part_info: Pointer to returned disk_partition_t
+ * @part_info: Pointer to returned struct disk_partition
* @response: Pointer to fastboot response buffer
*/
int fastboot_mmc_get_part_info(const char *part_name,
struct blk_desc **dev_desc,
- disk_partition_t *part_info, char *response)
+ struct disk_partition *part_info, char *response)
{
int r;
u32 download_bytes, char *response)
{
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) {
{
int ret;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
lbaint_t blks, blks_start, blks_size, grp_size;
struct mmc *mmc = find_mmc_device(CONFIG_FASTBOOT_FLASH_MMC_DEV);
{
env_t env_new;
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
int dev, part;
int err;
const char *ifname = env_ext4_get_intf();
{
ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
int dev, part;
int err;
loff_t off;
{
env_t __aligned(ARCH_DMA_MINALIGN) env_new;
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
int dev, part;
int err;
loff_t size;
{
ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
int dev, part;
int err;
#if CONFIG_IS_ENABLED(OF_CONTROL)
static inline int mmc_offset_try_partition(const char *str, s64 *val)
{
- disk_partition_t info;
+ struct disk_partition info;
struct blk_desc *desc;
int len, i, ret;
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;
/* 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 *);
#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)
{
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;
}
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);
}
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
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);
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;
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;
*/
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);
#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;
#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;
#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
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");
#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;
* @param[in] part_info Place to store the partition information
* @return The slot number (>= 0) on success, or a negative on error
*/
-int ab_select_slot(struct blk_desc *dev_desc, disk_partition_t *part_info);
+int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info);
#endif /* __ANDROID_AB_H */
int dev_num;
struct mmc *mmc;
struct blk_desc *mmc_blk;
- disk_partition_t info;
+ struct disk_partition info;
};
enum mmc_io_type {
#ifndef __U_BOOT_BTRFS_H__
#define __U_BOOT_BTRFS_H__
-int btrfs_probe(struct blk_desc *, disk_partition_t *);
+int btrfs_probe(struct blk_desc *fs_dev_desc,
+ struct disk_partition *fs_partition);
int btrfs_ls(const char *);
int btrfs_exists(const char *);
int btrfs_size(const char *, loff_t *);
int ext4fs_size(const char *filename, loff_t *size);
void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot);
int ext4fs_devread(lbaint_t sector, int byte_offset, int byte_len, char *buf);
-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);
long int read_allocated_block(struct ext2_inode *inode, int fileblock,
struct ext_block_cache *cache);
int ext4fs_probe(struct blk_desc *fs_dev_desc,
- disk_partition_t *fs_partition);
+ struct disk_partition *fs_partition);
int ext4_read_file(const char *filename, void *buf, loff_t offset, loff_t len,
loff_t *actread);
int ext4_read_superblock(char *buffer);
int file_fat_read_at(const char *filename, loff_t pos, void *buffer,
loff_t maxsize, loff_t *actread);
int file_fat_read(const char *filename, void *buffer, int maxsize);
-int fat_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+int fat_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
int fat_register_device(struct blk_desc *dev_desc, int part_no);
int file_fat_write(const char *filename, void *buf, loff_t offset, loff_t len,
*
* @part_name: Named partition to lookup
* @dev_desc: Pointer to returned blk_desc pointer
- * @part_info: Pointer to returned disk_partition_t
+ * @part_info: Pointer to returned struct disk_partition
* @response: Pointer to fastboot response buffer
*/
int fastboot_mmc_get_part_info(const char *part_name,
struct blk_desc **dev_desc,
- disk_partition_t *part_info, char *response);
+ struct disk_partition *part_info,
+ char *response);
/**
* fastboot_mmc_flash_write() - Write image to eMMC for fastboot
#include <part.h>
-int fs_devread(struct blk_desc *, disk_partition_t *, lbaint_t, int, int,
+int fs_devread(struct blk_desc *, struct disk_partition *, lbaint_t, int, int,
char *);
#endif /* __U_BOOT_FS_INTERNAL_H__ */
#define PART_BOOTABLE ((int)BIT(0))
#define PART_EFI_SYSTEM_PARTITION ((int)BIT(1))
-typedef struct disk_partition {
+struct disk_partition {
lbaint_t start; /* # of first block in partition */
lbaint_t size; /* number of blocks in partition */
ulong blksz; /* block size in bytes */
#ifdef CONFIG_DOS_PARTITION
uchar sys_ind; /* partition type */
#endif
-} disk_partition_t;
+};
struct disk_part {
int partnum;
- disk_partition_t gpt_part_info;
+ struct disk_partition gpt_part_info;
struct list_head list;
};
int host_get_dev_err(int dev, struct blk_desc **blk_devp);
/* disk/part.c */
-int part_get_info(struct blk_desc *dev_desc, int part, disk_partition_t *info);
+int part_get_info(struct blk_desc *dev_desc, int part,
+ struct disk_partition *info);
/**
* part_get_info_whole_disk() - get partition info for the special case of
* a partition occupying the entire disk.
*/
-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);
void part_print(struct blk_desc *dev_desc);
void part_init(struct blk_desc *dev_desc);
*/
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);
/**
* part_get_info_by_name_type() - Search for a partition by name
* otherwise error
*/
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);
/**
* part_get_info_by_name() - Search for a partition by name
* otherwise error
*/
int part_get_info_by_name(struct blk_desc *dev_desc,
- const char *name, disk_partition_t *info);
+ const char *name, struct disk_partition *info);
/**
* Get partition info from dev number + part name, or dev number + part number.
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);
/**
* part_set_generic_name() - create generic partition like hda1 or sdb2
static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; }
static inline int part_get_info(struct blk_desc *dev_desc, int part,
- disk_partition_t *info) { return -1; }
+ struct disk_partition *info) { return -1; }
static inline int part_get_info_whole_disk(struct blk_desc *dev_desc,
- disk_partition_t *info)
+ struct disk_partition *info)
{ return -1; }
static inline void part_print(struct blk_desc *dev_desc) {}
static inline void part_init(struct blk_desc *dev_desc) {}
struct blk_desc **dev_desc)
{ return -1; }
static inline 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)
+ const char *dev_part_str,
+ struct blk_desc **dev_desc,
+ struct disk_partition *info,
+ int allow_whole_dev)
{ *dev_desc = NULL; return -1; }
#endif
* @info: Returns partition information
*/
int (*get_info)(struct blk_desc *dev_desc, int part,
- disk_partition_t *info);
+ struct disk_partition *info);
/**
* print() - Print partition information
*/
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);
/**
* gpt_fill_header(): Fill the GPT header
* @return zero on success
*/
int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid,
- disk_partition_t *partitions, const int parts_count);
+ struct disk_partition *partitions, const int parts_count);
/**
* is_valid_gpt_buf() - Ensure that the Primary GPT information is valid
* @return - '0' on success, otherwise error
*/
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);
} reiserfs_error_t;
-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);
extern int reiserfs_ls (char *dirname);
extern int reiserfs_open (char *filename);
extern int reiserfs_read (char *buf, unsigned len);
#ifndef __SANDBOX_FS__
#define __SANDBOX_FS__
-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);
int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
loff_t maxsize, loff_t *actread);
int ubifs_is_mounted(void);
int ubifs_load(char *filename, u32 addr, u32 size);
-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);
int ubifs_ls(const char *dir_name);
int ubifs_exists(const char *filename);
int ubifs_size(const char *filename, loff_t *size);
int zfs_ls(device_t dev, const char *path,
int (*hook) (const char *, const struct zfs_dirhook_info *));
int zfs_devread(int sector, int byte_offset, int byte_len, char *buf);
-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);
void zfs_unmount(struct zfs_data *data);
int lzjb_decompress(void *, void *, uint32_t, uint32_t);
#endif
*/
static void *dp_part_node(void *buf, struct blk_desc *desc, int part)
{
- disk_partition_t info;
+ struct disk_partition info;
part_get_info(desc, part, &info);
{
int is_net;
struct blk_desc *desc = NULL;
- disk_partition_t fs_partition;
+ struct disk_partition fs_partition;
int part = 0;
char filename[32] = { 0 }; /* dp->str is u16[32] long */
char *s;
/* Store first EFI system partition */
if (part && !efi_system_partition.if_type) {
int r;
- disk_partition_t info;
+ struct disk_partition info;
r = part_get_info(desc, part, &info);
if (r)
{
int disks = 0;
char devname[32] = { 0 }; /* dp->str is u16[32] long */
- disk_partition_t info;
+ struct disk_partition info;
int part;
struct efi_device_path *dp = NULL;
efi_status_t ret;
{
struct efi_handler *handler;
struct efi_disk_obj *diskobj;
- disk_partition_t info;
+ struct disk_partition info;
efi_status_t ret;
int r;
utf8_utf16_strcpy(&dst, filename);
} else if (!guidcmp(info_type, &efi_file_system_info_guid)) {
struct efi_file_system_info *info = buffer;
- disk_partition_t part;
+ struct disk_partition part;
efi_uintn_t required_size;
int r;