}
}
+static efi_guid_t system_guid = PARTITION_SYSTEM_GUID;
+
+static inline int is_bootable(gpt_entry *p)
+{
+ return p->attributes.fields.legacy_bios_bootable ||
+ !memcmp(&(p->partition_type_guid), &system_guid,
+ sizeof(efi_guid_t));
+}
+
/*
* Public Functions (include/part.h)
*/
sprintf((char *)info->name, "%s",
print_efiname(&gpt_pte[part - 1]));
sprintf((char *)info->type, "U-Boot");
+ info->bootable = is_bootable(&gpt_pte[part - 1]);
#ifdef CONFIG_PARTITION_UUIDS
uuid_string(gpt_pte[part - 1].unique_partition_guid.b, info->uuid);
#endif