From: Andreas Reichel <[email protected]> If the user mixes wrong GUID with valid FS in GPT partitions, i.e. an invalid partitioning (as it happened to a highly experienced colleague), error searching can be frustrating. In this case, to make things clearer, explicitely say that the found partition has an unsupported GUID.
Signed-off-by: Andreas Reichel <[email protected]> --- tools/ebgpart.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/ebgpart.c b/tools/ebgpart.c index 410472f..fc3bf3b 100644 --- a/tools/ebgpart.c +++ b/tools/ebgpart.c @@ -75,12 +75,14 @@ static char *type_to_name(char t) static bool check_GPT_FAT_entry(int fd, struct EFIpartitionentry *e, PedFileSystemType *pfst, uint32_t i) { - if (strcmp(GPT_PARTITION_GUID_FAT_NTFS, GUID_to_str(e->type_GUID)) != - 0 && - strcmp(GPT_PARTITION_GUID_ESP, GUID_to_str(e->type_GUID)) != 0) { + char *guid_str = GUID_to_str(e->type_GUID); + if (strcmp(GPT_PARTITION_GUID_FAT_NTFS, guid_str) != 0 && + strcmp(GPT_PARTITION_GUID_ESP, guid_str) != 0) { if (asprintf(&pfst->name, "%s", "not supported") == -1) { goto error_asprintf; } + VERBOSE(stderr, "GPT entry has unsupported GUID: %s\n", + guid_str); return true; } VERBOSE(stdout, "GPT Partition #%u is FAT/NTFS.\n", i); -- 2.19.1 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20181024090537.13783-1-andreas.reichel.ext%40siemens.com. For more options, visit https://groups.google.com/d/optout.
