svn commit: r314616 - head/lib/libefivar
Warner Losh
imp at FreeBSD.org
Fri Mar 3 20:22:57 UTC 2017
Author: imp
Date: Fri Mar 3 20:22:56 2017
New Revision: 314616
URL: https://svnweb.freebsd.org/changeset/base/314616
Log:
Only compile the known uuid table once.
Sponsored by: Netflix
Modified:
head/lib/libefivar/efivar.c
Modified: head/lib/libefivar/efivar.c
==============================================================================
--- head/lib/libefivar/efivar.c Fri Mar 3 20:22:47 2017 (r314615)
+++ head/lib/libefivar/efivar.c Fri Mar 3 20:22:56 2017 (r314616)
@@ -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
More information about the svn-src-head
mailing list