Move uuid_table definition to efivar.h.
Create new function efi_known_guid() to return list of guids. Sponsored by: Netflix
This commit is contained in:
parent
43b294a4db
commit
e174551332
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314615
@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "efivar.h"
|
||||
#include "libefivar_int.h"
|
||||
|
||||
static int efi_fd = -2;
|
||||
@ -44,12 +45,7 @@ static int efi_fd = -2;
|
||||
|
||||
const efi_guid_t efi_guid_empty = Z;
|
||||
|
||||
static struct uuid_table
|
||||
{
|
||||
const char *uuid_str;
|
||||
const char *name;
|
||||
efi_guid_t guid;
|
||||
} guid_tbl [] =
|
||||
static struct uuid_table guid_tbl [] =
|
||||
{
|
||||
{ "00000000-0000-0000-0000-000000000000", "zero", Z },
|
||||
{ "093e0fae-a6c4-4f50-9f1b-d41e2b89c19a", "sha512", Z },
|
||||
@ -103,6 +99,14 @@ efi_guid_tbl_compile(void)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
efi_known_guid(struct uuid_table **tbl)
|
||||
{
|
||||
|
||||
*tbl = guid_tbl;
|
||||
return (nitems(guid_tbl));
|
||||
}
|
||||
|
||||
static int
|
||||
efi_open_dev(void)
|
||||
{
|
||||
|
@ -83,6 +83,16 @@ int efi_set_variable(efi_guid_t guid, const char *name,
|
||||
int efi_str_to_guid(const char *s, efi_guid_t *guid);
|
||||
int efi_variables_supported(void);
|
||||
|
||||
/* FreeBSD extensions */
|
||||
struct uuid_table
|
||||
{
|
||||
const char *uuid_str;
|
||||
const char *name;
|
||||
efi_guid_t guid;
|
||||
};
|
||||
|
||||
int efi_known_guid(struct uuid_table **);
|
||||
|
||||
extern const efi_guid_t efi_guid_empty;
|
||||
|
||||
/* Stubs that are expected, but aren't really used */
|
||||
|
Loading…
Reference in New Issue
Block a user