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

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