]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Tools/Source/Common/ParseInf.h
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Common / ParseInf.h
index 7dba8f8fdcc36e632a211986d554c09ece38e2f5..3d5eb5c34fb2e031e70f0ca81966b67f2c1f2e53 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -124,6 +124,42 @@ Returns:
   EFI_NOT_FOUND           Section/Token/Value not found.\r
 \r
 --*/\r
+\r
+EFI_STATUS\r
+FindTokenInstanceInSection (\r
+  IN MEMORY_FILE    *InputFile,\r
+  IN CHAR8          *Section,\r
+  IN UINTN          Instance,\r
+  OUT CHAR8         *Token,\r
+  OUT CHAR8         *Value\r
+  )\r
+;\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Finds the Instance-th token in a section.\r
+\r
+Arguments:\r
+\r
+  InputFile Memory file image.\r
+  Section   The section to search for, a string within [].\r
+  Instance  Specify the Instance-th token to search for, starting from zero\r
+  Token     The token name to return. Caller should allocate the buffer.\r
+            Must be _MAX_PATH in size.\r
+  Value     The token value to return. Caller should allocate the buffer.\r
+            Must be _MAX_PATH in size.\r
+\r
+Returns:\r
+\r
+  EFI_SUCCESS             Token and Value found.\r
+  EFI_ABORTED             Format error detected in INF file.\r
+  EFI_INVALID_PARAMETER   Input argument was null.\r
+  EFI_LOAD_ERROR          Error reading from the file.\r
+  EFI_NOT_FOUND           Section/Token/Value not found.\r
+\r
+--*/\r
+\r
 EFI_STATUS\r
 StringToGuid (\r
   IN CHAR8        *AsciiGuidBuffer,\r