mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
guid: Unify GUID types
There are 3 implementations of a GUID in GRUB. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
7e4da6fb2d
commit
06edd40db7
37 files changed
+130
-148
No files matched your search
+11
-11
@@ -35,12 +35,12 @@ grub_efi_handle_t grub_efi_image_handle;
|
||||
/* The pointer to a system table. Filled in by the startup code. */
|
||||
grub_efi_system_table_t *grub_efi_system_table;
|
||||
|
||||
static grub_efi_guid_t console_control_guid = GRUB_EFI_CONSOLE_CONTROL_GUID;
|
||||
static grub_efi_guid_t loaded_image_guid = GRUB_EFI_LOADED_IMAGE_GUID;
|
||||
static grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
|
||||
static grub_guid_t console_control_guid = GRUB_EFI_CONSOLE_CONTROL_GUID;
|
||||
static grub_guid_t loaded_image_guid = GRUB_EFI_LOADED_IMAGE_GUID;
|
||||
static grub_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
|
||||
|
||||
void *
|
||||
grub_efi_locate_protocol (grub_efi_guid_t *protocol, void *registration)
|
||||
grub_efi_locate_protocol (grub_guid_t *protocol, void *registration)
|
||||
{
|
||||
void *interface;
|
||||
grub_efi_status_t status;
|
||||
@@ -59,7 +59,7 @@ grub_efi_locate_protocol (grub_efi_guid_t *protocol, void *registration)
|
||||
from the heap. */
|
||||
grub_efi_handle_t *
|
||||
grub_efi_locate_handle (grub_efi_locate_search_type_t search_type,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
void *search_key,
|
||||
grub_efi_uintn_t *num_handles)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ grub_efi_locate_handle (grub_efi_locate_search_type_t search_type,
|
||||
|
||||
void *
|
||||
grub_efi_open_protocol (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
grub_guid_t *protocol,
|
||||
grub_efi_uint32_t attributes)
|
||||
{
|
||||
grub_efi_boot_services_t *b;
|
||||
@@ -119,7 +119,7 @@ grub_efi_open_protocol (grub_efi_handle_t handle,
|
||||
}
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_close_protocol (grub_efi_handle_t handle, grub_efi_guid_t *protocol)
|
||||
grub_efi_close_protocol (grub_efi_handle_t handle, grub_guid_t *protocol)
|
||||
{
|
||||
grub_efi_boot_services_t *b = grub_efi_system_table->boot_services;
|
||||
|
||||
@@ -203,7 +203,7 @@ grub_efi_set_virtual_address_map (grub_efi_uintn_t memory_map_size,
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_efi_set_variable_with_attributes (const char *var, const grub_efi_guid_t *guid,
|
||||
grub_efi_set_variable_with_attributes (const char *var, const grub_guid_t *guid,
|
||||
void *data, grub_size_t datasize, grub_efi_uint32_t attributes)
|
||||
{
|
||||
grub_efi_status_t status;
|
||||
@@ -230,7 +230,7 @@ grub_efi_set_variable_with_attributes (const char *var, const grub_efi_guid_t *g
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_efi_set_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
grub_efi_set_variable (const char *var, const grub_guid_t *guid,
|
||||
void *data, grub_size_t datasize)
|
||||
{
|
||||
return grub_efi_set_variable_with_attributes (var, guid, data, datasize,
|
||||
@@ -241,7 +241,7 @@ grub_efi_set_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_get_variable_with_attributes (const char *var,
|
||||
const grub_efi_guid_t *guid,
|
||||
const grub_guid_t *guid,
|
||||
grub_size_t *datasize_out,
|
||||
void **data_out,
|
||||
grub_efi_uint32_t *attributes)
|
||||
@@ -296,7 +296,7 @@ grub_efi_get_variable_with_attributes (const char *var,
|
||||
}
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
||||
grub_efi_get_variable (const char *var, const grub_guid_t *guid,
|
||||
grub_size_t *datasize_out, void **data_out)
|
||||
{
|
||||
return grub_efi_get_variable_with_attributes (var, guid, datasize_out, data_out, NULL);
|
||||
|
||||
Reference in new issue
Block a user