]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.c
SignedCapsulePkg/IniParsing: Rename StrToGuid to avoid link failure
[mirror_edk2.git] / SignedCapsulePkg / Library / IniParsingLib / IniParsingLib.c
index a8773c1a80e337f5d1fc656a9f6a6b1d100f8423..16e1349936c422febcc58a9807bf56afa2161ee9 100644 (file)
@@ -25,7 +25,7 @@
   OpenIniFile(), PreProcessDataFile(), ProfileGetSection(), ProfileGetEntry()\r
   will receive untrusted input and do basic validation.\r
 \r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
@@ -50,8 +50,8 @@
 // This is default allocation. Reallocation will happen if it is not enough.\r
 #define MAX_LINE_LENGTH           512\r
 \r
-typedef struct _SECTION_ITEM SECTION_ITEM;\r
-struct _SECTION_ITEM {\r
+typedef struct _INI_SECTION_ITEM SECTION_ITEM;\r
+struct _INI_SECTION_ITEM {\r
   CHAR8                           *PtrSection;\r
   UINTN                           SecNameLen;\r
   CHAR8                           *PtrEntry;\r
@@ -59,8 +59,8 @@ struct _SECTION_ITEM {
   SECTION_ITEM                    *PtrNext;\r
 };\r
 \r
-typedef struct _COMMENT_LINE COMMENT_LINE;\r
-struct _COMMENT_LINE {\r
+typedef struct _INI_COMMENT_LINE COMMENT_LINE;\r
+struct _INI_COMMENT_LINE {\r
   CHAR8                           *PtrComment;\r
   COMMENT_LINE                    *PtrNext;\r
 };\r
@@ -933,7 +933,7 @@ AsciiStrToBuf (
 \r
 **/\r
 EFI_STATUS\r
-AsciiStrToGuid (\r
+IniAsciiStrToGuid (\r
   IN  CHAR8    *Str,\r
   OUT EFI_GUID *Guid\r
   )\r
@@ -1257,10 +1257,11 @@ GetGuidFromDataFile (
   if (EFI_ERROR(Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
+  ASSERT (Value != NULL);\r
   if (!IsValidGuid(Value, AsciiStrLen(Value))) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  Status = AsciiStrToGuid(Value, Guid);\r
+  Status = IniAsciiStrToGuid(Value, Guid);\r
   if (EFI_ERROR (Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -1303,6 +1304,7 @@ GetDecimalUintnFromDataFile (
   if (EFI_ERROR(Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
+  ASSERT (Value != NULL);\r
   if (!IsValidDecimalString(Value, AsciiStrLen(Value))) {\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -1346,6 +1348,7 @@ GetHexUintnFromDataFile (
   if (EFI_ERROR(Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
+  ASSERT (Value != NULL);\r
   if (!IsValidHexString(Value, AsciiStrLen(Value))) {\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -1389,6 +1392,7 @@ GetHexUint64FromDataFile (
   if (EFI_ERROR(Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
+  ASSERT (Value != NULL);\r
   if (!IsValidHexString(Value, AsciiStrLen(Value))) {\r
     return EFI_NOT_FOUND;\r
   }\r