]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update comments for HiiConfigRoutine->ExtractConfig function, also update HiiConfigRo...
authorEric Dong <eric.dong@intel.com>
Fri, 23 Aug 2013 05:53:04 +0000 (05:53 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 23 Aug 2013 05:53:04 +0000 (05:53 +0000)
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14593 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
MdePkg/Include/Protocol/HiiConfigRouting.h

index d6705d02473edecb5555b851e0e5cdb96e285c42..4959d8302f2f9eeb185e37bfbf4b4e15d24f75ac 100644 (file)
@@ -3448,8 +3448,10 @@ ConfigRequestValidate (
                                  Progress parameter is set to NULL.\r
   @retval EFI_INVALID_PARAMETER  Illegal syntax. Progress set to most recent &\r
                                  before the error or the beginning of the string.\r
-  @retval EFI_INVALID_PARAMETER  Unknown name. Progress points to the & before the\r
-                                 name in question.\r
+  @retval EFI_INVALID_PARAMETER  The ExtractConfig function of the underlying HII\r
+                                 Configuration Access Protocol returned \r
+                                 EFI_INVALID_PARAMETER. Progress set to most recent\r
+                                 & before the error or the beginning of the string.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -4322,7 +4324,7 @@ HiiBlockToConfig (
     //\r
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);\r
     if (EFI_ERROR (Status)) {\r
-      *Progress = ConfigRequest;\r
+      *Progress = TmpPtr - 1;\r
       goto Exit;\r
     }\r
     Offset = 0;\r
@@ -4335,7 +4337,7 @@ HiiBlockToConfig (
 \r
     StringPtr += Length;\r
     if (StrnCmp (StringPtr, L"&WIDTH=", StrLen (L"&WIDTH=")) != 0) {\r
-      *Progress = StringPtr - Length - StrLen (L"OFFSET=") - 1;\r
+      *Progress = TmpPtr - 1;\r
       Status = EFI_INVALID_PARAMETER;\r
       goto Exit;\r
     }\r
@@ -4346,7 +4348,7 @@ HiiBlockToConfig (
     //\r
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);\r
     if (EFI_ERROR (Status)) {\r
-      *Progress = ConfigRequest;\r
+      *Progress =  TmpPtr - 1;\r
       goto Exit;\r
     }\r
     Width = 0;\r
@@ -4359,7 +4361,7 @@ HiiBlockToConfig (
 \r
     StringPtr += Length;\r
     if (*StringPtr != 0 && *StringPtr != L'&') {\r
-      *Progress = StringPtr - Length - StrLen (L"&WIDTH=");\r
+      *Progress =  TmpPtr - 1;\r
       Status = EFI_INVALID_PARAMETER;\r
       goto Exit;\r
     }\r
@@ -4523,6 +4525,7 @@ HiiConfigToBlock (
 {\r
   HII_DATABASE_PRIVATE_DATA           *Private;\r
   EFI_STRING                          StringPtr;\r
+  EFI_STRING                          TmpPtr;\r
   UINTN                               Length;\r
   EFI_STATUS                          Status;\r
   UINT8                               *TmpBuffer;\r
@@ -4581,13 +4584,14 @@ HiiConfigToBlock (
   // <BlockConfig> ::= 'OFFSET='<Number>&'WIDTH='<Number>&'VALUE='<Number>\r
   //\r
   while (*StringPtr != 0 && StrnCmp (StringPtr, L"&OFFSET=", StrLen (L"&OFFSET=")) == 0) {\r
+    TmpPtr     = StringPtr;\r
     StringPtr += StrLen (L"&OFFSET=");\r
     //\r
     // Get Offset\r
     //\r
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);\r
     if (EFI_ERROR (Status)) {\r
-      *Progress = ConfigResp;\r
+      *Progress = TmpPtr;\r
       goto Exit;\r
     }\r
     Offset = 0;\r
@@ -4600,7 +4604,7 @@ HiiConfigToBlock (
 \r
     StringPtr += Length;\r
     if (StrnCmp (StringPtr, L"&WIDTH=", StrLen (L"&WIDTH=")) != 0) {\r
-      *Progress = StringPtr - Length - StrLen (L"&OFFSET=");\r
+      *Progress = TmpPtr;\r
       Status = EFI_INVALID_PARAMETER;\r
       goto Exit;\r
     }\r
@@ -4611,7 +4615,7 @@ HiiConfigToBlock (
     //\r
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);\r
     if (EFI_ERROR (Status)) {\r
-      *Progress = ConfigResp;\r
+      *Progress = TmpPtr;\r
       goto Exit;\r
     }\r
     Width = 0;\r
@@ -4624,7 +4628,7 @@ HiiConfigToBlock (
 \r
     StringPtr += Length;\r
     if (StrnCmp (StringPtr, L"&VALUE=", StrLen (L"&VALUE=")) != 0) {\r
-      *Progress = StringPtr - Length - StrLen (L"&WIDTH=");\r
+      *Progress = TmpPtr;\r
       Status = EFI_INVALID_PARAMETER;\r
       goto Exit;\r
     }\r
@@ -4635,13 +4639,13 @@ HiiConfigToBlock (
     //\r
     Status = GetValueOfNumber (StringPtr, &Value, &Length);\r
     if (EFI_ERROR (Status)) {\r
-      *Progress = ConfigResp;\r
+      *Progress = TmpPtr;\r
       goto Exit;\r
     }\r
 \r
     StringPtr += Length;\r
     if (*StringPtr != 0 && *StringPtr != L'&') {\r
-      *Progress = StringPtr - Length - StrLen (L"&VALUE=");\r
+      *Progress = TmpPtr;\r
       Status = EFI_INVALID_PARAMETER;\r
       goto Exit;\r
     }\r
index 4423a5c04d1a414aff6a4cdd60666aff3f00fe19..467a2dcc8201ad3c86c4e9cc841e0136f04c4ff1 100644 (file)
@@ -5,7 +5,7 @@
   information from configuration applications, routing the\r
   results to the appropriate drivers.\r
   \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -99,8 +99,13 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL;
                                   to the most recent & before the\r
                                   error, or the beginning of the\r
                                   string.\r
-  @retval EFI_INVALID_PARAMETER   Unknown name.\r
-\r
+  @retval EFI_INVALID_PARAMETER   The ExtractConfig function of the\r
+                                  underlying HII Configuration \r
+                                  Access Protocol returned \r
+                                  EFI_INVALID_PARAMETER. Progress\r
+                                  set to most recent & before the\r
+                                  error or the beginning of the\r
+                                  string.\r
 \r
 **/\r
 typedef\r