Author: imp
Date: Fri Mar  3 20:23:23 2017
New Revision: 314623
URL: https://svnweb.freebsd.org/changeset/base/314623

Log:
  Make sure guid table is compiled before we use it.
  
  Sponsored by: Netflix

Modified:
  head/lib/libefivar/efivar.c

Modified: head/lib/libefivar/efivar.c
==============================================================================
--- head/lib/libefivar/efivar.c Fri Mar  3 20:23:21 2017        (r314622)
+++ head/lib/libefivar/efivar.c Fri Mar  3 20:23:23 2017        (r314623)
@@ -301,6 +301,7 @@ efi_guid_to_name(efi_guid_t *guid, char 
        size_t i;
        uint32_t status;
 
+       efi_guid_tbl_compile();
        for (i = 0; i < nitems(guid_tbl); i++) {
                if (uuid_equal(guid, &guid_tbl[i].guid, &status)) {
                        *name = strdup(guid_tbl[i].name);
@@ -337,6 +338,7 @@ efi_name_to_guid(const char *name, efi_g
 {
        size_t i;
 
+       efi_guid_tbl_compile();
        for (i = 0; i < nitems(guid_tbl); i++) {
                if (strcmp(name, guid_tbl[i].name) == 0) {
                        *guid = guid_tbl[i].guid;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to