summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-03-19 13:49:34 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-04-30 10:25:07 +0200
commit25801acc1fd64b284d250e8cee7c5ea0c5186f1c (patch)
tree11aa991de56aeb05cf0fea959c97ef6b70b1b7ed /cmd
parent4fe050e65f61cc5e7734aee0637a18ac16b10061 (diff)
downloadu-boot-25801acc1fd64b284d250e8cee7c5ea0c5186f1c.tar.gz
part: detect EFI system partition
Up to now for MBR and GPT partitions the info field 'bootable' was set to 1 if either the partition was an EFI system partition or the bootable flag was set. Turn info field 'bootable' into a bit mask with separate bits for bootable and EFI system partition. This will allow us to identify the EFI system partition in the UEFI sub-system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/gpt.c b/cmd/gpt.c
index efaf1bcecb..b94f0051cd 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -245,7 +245,7 @@ static void print_gpt_info(void)
printf("Block size %lu, name %s\n", curr->gpt_part_info.blksz,
curr->gpt_part_info.name);
printf("Type %s, bootable %d\n", curr->gpt_part_info.type,
- curr->gpt_part_info.bootable);
+ curr->gpt_part_info.bootable & PART_BOOTABLE);
#ifdef CONFIG_PARTITION_UUIDS
printf("UUID %s\n", curr->gpt_part_info.uuid);
#endif
@@ -535,7 +535,7 @@ static int set_gpt_info(struct blk_desc *dev_desc,
/* bootable */
if (found_key(tok, "bootable"))
- parts[i].bootable = 1;
+ parts[i].bootable = PART_BOOTABLE;
}
*parts_count = p_count;