Skip to content

Commit

Permalink
chain.c32: Allow both "guid" and "uuid"
Browse files Browse the repository at this point in the history
The GPT specification calls it "guid", but the Unix world generally
calls it "uuid".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
H. Peter Anvin committed Mar 14, 2011
1 parent cf4679d commit 3905382
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion com32/modules/chain.c
Expand Up @@ -1387,6 +1387,8 @@ int main(int argc, char *argv[])
|| !strncmp(argv[i], "mbr=", 4)
|| !strncmp(argv[i], "guid:", 5)
|| !strncmp(argv[i], "guid=", 5)
|| !strncmp(argv[i], "uuid:", 5)
|| !strncmp(argv[i], "uuid=", 5)
|| !strncmp(argv[i], "label:", 6)
|| !strncmp(argv[i], "label=", 6)
|| !strcmp(argv[i], "boot")
Expand Down Expand Up @@ -1425,7 +1427,8 @@ int main(int argc, char *argv[])
error("Unable to find requested MBR signature\n");
goto bail;
}
} else if (!strncmp(drivename, "guid", 4)) {
} else if (!strncmp(drivename, "guid", 4) ||
!strncmp(drivename, "uuid", 4)) {
if (str_to_guid(drivename + 5, &gpt_guid))
goto bail;
drive = find_by_guid(&gpt_guid, &cur_part);
Expand Down

0 comments on commit 3905382

Please sign in to comment.