Blame SOURCES/0005-Make-all-efi_guid_t-const.patch

89397c
From eba569a8e6c33f07042758cbfa1706d7339464e1 Mon Sep 17 00:00:00 2001
89397c
From: Gary Lin <glin@suse.com>
89397c
Date: Wed, 13 Jan 2016 16:05:21 +0800
f928ec
Subject: [PATCH 05/10] Make all efi_guid_t const
89397c
89397c
All UEFI GUIDs defined in efivar are const. Declare all of them const
89397c
to make gcc happy.
89397c
89397c
Signed-off-by: Gary Lin <glin@suse.com>
89397c
---
89397c
 src/mokutil.c | 18 +++++++++---------
89397c
 1 file changed, 9 insertions(+), 9 deletions(-)
89397c
89397c
diff --git a/src/mokutil.c b/src/mokutil.c
f928ec
index 1fb34f9d3aa..d2c52b4caaf 100644
89397c
--- a/src/mokutil.c
89397c
+++ b/src/mokutil.c
89397c
@@ -200,7 +200,7 @@ efichar_from_char (efi_char16_t *dest, const char *src, size_t dest_len)
89397c
 }
89397c
 
89397c
 static uint32_t
89397c
-efi_hash_size (efi_guid_t *hash_type)
89397c
+efi_hash_size (const efi_guid_t *hash_type)
89397c
 {
89397c
 	if (efi_guid_cmp (hash_type, &efi_guid_sha1) == 0) {
89397c
 		return SHA_DIGEST_LENGTH;
89397c
@@ -218,7 +218,7 @@ efi_hash_size (efi_guid_t *hash_type)
89397c
 }
89397c
 
89397c
 static uint32_t
89397c
-signature_size (efi_guid_t *hash_type)
89397c
+signature_size (const efi_guid_t *hash_type)
89397c
 {
89397c
 	uint32_t hash_size;
89397c
 
89397c
@@ -439,7 +439,7 @@ list_keys (uint8_t *data, size_t data_size)
89397c
 
89397c
 /* match the hash in the hash array and return the index if matched */
89397c
 static int
89397c
-match_hash_array (efi_guid_t *hash_type, const void *hash,
89397c
+match_hash_array (const efi_guid_t *hash_type, const void *hash,
89397c
 		  const void *hash_array, const uint32_t array_size)
89397c
 {
89397c
 	uint32_t hash_size, hash_count;
89397c
@@ -469,8 +469,8 @@ match_hash_array (efi_guid_t *hash_type, const void *hash,
89397c
 }
89397c
 
89397c
 static int
89397c
-delete_data_from_list (efi_guid_t *var_guid, const char *var_name,
89397c
-		       efi_guid_t *type, void *data, uint32_t data_size)
89397c
+delete_data_from_list (const efi_guid_t *var_guid, const char *var_name,
89397c
+		       const efi_guid_t *type, void *data, uint32_t data_size)
89397c
 {
89397c
 	uint8_t *var_data = NULL;
89397c
 	size_t var_data_size = 0;
89397c
@@ -1006,8 +1006,8 @@ is_valid_cert (void *cert, uint32_t cert_size)
89397c
 }
89397c
 
89397c
 static int
89397c
-is_duplicate (efi_guid_t *type, const void *data, const uint32_t data_size,
89397c
-	      efi_guid_t *vendor, const char *db_name)
89397c
+is_duplicate (const efi_guid_t *type, const void *data, const uint32_t data_size,
89397c
+	      const efi_guid_t *vendor, const char *db_name)
89397c
 {
89397c
 	uint8_t *var_data;
89397c
 	size_t var_data_size;
89397c
@@ -1059,7 +1059,7 @@ done:
89397c
 }
89397c
 
89397c
 static int
89397c
-is_valid_request (efi_guid_t *type, void *mok, uint32_t mok_size,
89397c
+is_valid_request (const efi_guid_t *type, void *mok, uint32_t mok_size,
89397c
 		  MokRequest req)
89397c
 {
89397c
 	switch (req) {
89397c
@@ -1096,7 +1096,7 @@ is_valid_request (efi_guid_t *type, void *mok, uint32_t mok_size,
89397c
 }
89397c
 
89397c
 static int
89397c
-in_pending_request (efi_guid_t *type, void *data, uint32_t data_size,
89397c
+in_pending_request (const efi_guid_t *type, void *data, uint32_t data_size,
89397c
 		    MokRequest req)
89397c
 {
89397c
 	uint8_t *authvar_data;
89397c
-- 
f928ec
2.17.1
89397c