Only compile the known uuid table once.

Sponsored by: Netflix
This commit is contained in:
imp 2017-03-03 20:22:56 +00:00
parent 5e64636423
commit aa13a34d72

View File

@ -88,7 +88,10 @@ efi_guid_tbl_compile(void)
{
size_t i;
uint32_t status;
static int done = 0;
if (done)
return;
for (i = 0; i < nitems(guid_tbl); i++) {
uuid_from_string(guid_tbl[i].uuid_str, &guid_tbl[i].guid,
&status);
@ -97,6 +100,7 @@ efi_guid_tbl_compile(void)
fprintf(stderr, "Can't convert %s to a uuid for %s: %d\n",
guid_tbl[i].uuid_str, guid_tbl[i].name, (int)status);
}
done = 1;
}
int