mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-13 05:55:02 -04:00
disk: part_dos: checkpatch cleanups
Minor cleanups required so later patches don't trigger checkpatch. Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
b4414f4a4a
commit
304b571130
@ -65,7 +65,8 @@ static inline int is_bootable(dos_partition_t *p)
|
|||||||
return p->boot_ind == 0x80;
|
return p->boot_ind == 0x80;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_one_part (dos_partition_t *p, int ext_part_sector, int part_num)
|
static void print_one_part(dos_partition_t *p, int ext_part_sector,
|
||||||
|
int part_num)
|
||||||
{
|
{
|
||||||
int lba_start = ext_part_sector + le32_to_int (p->start4);
|
int lba_start = ext_part_sector + le32_to_int (p->start4);
|
||||||
int lba_size = le32_to_int (p->size4);
|
int lba_size = le32_to_int (p->size4);
|
||||||
@ -105,8 +106,9 @@ int test_part_dos (block_dev_desc_t *dev_desc)
|
|||||||
|
|
||||||
/* Print a partition that is relative to its Extended partition table
|
/* Print a partition that is relative to its Extended partition table
|
||||||
*/
|
*/
|
||||||
static void print_partition_extended (block_dev_desc_t *dev_desc, int ext_part_sector, int relative,
|
static void print_partition_extended(block_dev_desc_t *dev_desc,
|
||||||
int part_num)
|
int ext_part_sector, int relative,
|
||||||
|
int part_num)
|
||||||
{
|
{
|
||||||
ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
|
ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
|
||||||
dos_partition_t *pt;
|
dos_partition_t *pt;
|
||||||
@ -135,7 +137,7 @@ static void print_partition_extended (block_dev_desc_t *dev_desc, int ext_part_s
|
|||||||
|
|
||||||
if ((pt->sys_ind != 0) &&
|
if ((pt->sys_ind != 0) &&
|
||||||
(ext_part_sector == 0 || !is_extended (pt->sys_ind)) ) {
|
(ext_part_sector == 0 || !is_extended (pt->sys_ind)) ) {
|
||||||
print_one_part (pt, ext_part_sector, part_num);
|
print_one_part(pt, ext_part_sector, part_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reverse engr the fdisk part# assignment rule! */
|
/* Reverse engr the fdisk part# assignment rule! */
|
||||||
@ -151,10 +153,9 @@ static void print_partition_extended (block_dev_desc_t *dev_desc, int ext_part_s
|
|||||||
if (is_extended (pt->sys_ind)) {
|
if (is_extended (pt->sys_ind)) {
|
||||||
int lba_start = le32_to_int (pt->start4) + relative;
|
int lba_start = le32_to_int (pt->start4) + relative;
|
||||||
|
|
||||||
print_partition_extended (dev_desc, lba_start,
|
print_partition_extended(dev_desc, lba_start,
|
||||||
ext_part_sector == 0 ? lba_start
|
ext_part_sector == 0 ? lba_start : relative,
|
||||||
: relative,
|
part_num);
|
||||||
part_num);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,8 +262,8 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part
|
|||||||
|
|
||||||
void print_part_dos (block_dev_desc_t *dev_desc)
|
void print_part_dos (block_dev_desc_t *dev_desc)
|
||||||
{
|
{
|
||||||
printf ("Partition Start Sector Num Sectors Type\n");
|
printf("Partition Start Sector Num Sectors Type\n");
|
||||||
print_partition_extended (dev_desc, 0, 0, 1);
|
print_partition_extended(dev_desc, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_partition_info_dos (block_dev_desc_t *dev_desc, int part, disk_partition_t * info)
|
int get_partition_info_dos (block_dev_desc_t *dev_desc, int part, disk_partition_t * info)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user