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

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