Revision: 14593
          http://sourceforge.net/p/edk2/code/14593
Author:   ydong10
Date:     2013-08-23 05:53:04 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
Update comments for HiiConfigRoutine->ExtractConfig function, also update 
HiiConfigRoutine->ConfigToBlock/BlockToConfig to follow this new spec.

Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
    trunk/edk2/MdePkg/Include/Protocol/HiiConfigRouting.h

Modified: trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c    
2013-08-23 05:49:50 UTC (rev 14592)
+++ trunk/edk2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c    
2013-08-23 05:53:04 UTC (rev 14593)
@@ -3448,8 +3448,10 @@
                                  Progress parameter is set to NULL.
   @retval EFI_INVALID_PARAMETER  Illegal syntax. Progress set to most recent &
                                  before the error or the beginning of the 
string.
-  @retval EFI_INVALID_PARAMETER  Unknown name. Progress points to the & before 
the
-                                 name in question.
+  @retval EFI_INVALID_PARAMETER  The ExtractConfig function of the underlying 
HII
+                                 Configuration Access Protocol returned 
+                                 EFI_INVALID_PARAMETER. Progress set to most 
recent
+                                 & before the error or the beginning of the 
string.
 
 **/
 EFI_STATUS
@@ -4322,7 +4324,7 @@
     //
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
     if (EFI_ERROR (Status)) {
-      *Progress = ConfigRequest;
+      *Progress = TmpPtr - 1;
       goto Exit;
     }
     Offset = 0;
@@ -4335,7 +4337,7 @@
 
     StringPtr += Length;
     if (StrnCmp (StringPtr, L"&WIDTH=", StrLen (L"&WIDTH=")) != 0) {
-      *Progress = StringPtr - Length - StrLen (L"OFFSET=") - 1;
+      *Progress = TmpPtr - 1;
       Status = EFI_INVALID_PARAMETER;
       goto Exit;
     }
@@ -4346,7 +4348,7 @@
     //
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
     if (EFI_ERROR (Status)) {
-      *Progress = ConfigRequest;
+      *Progress =  TmpPtr - 1;
       goto Exit;
     }
     Width = 0;
@@ -4359,7 +4361,7 @@
 
     StringPtr += Length;
     if (*StringPtr != 0 && *StringPtr != L'&') {
-      *Progress = StringPtr - Length - StrLen (L"&WIDTH=");
+      *Progress =  TmpPtr - 1;
       Status = EFI_INVALID_PARAMETER;
       goto Exit;
     }
@@ -4523,6 +4525,7 @@
 {
   HII_DATABASE_PRIVATE_DATA           *Private;
   EFI_STRING                          StringPtr;
+  EFI_STRING                          TmpPtr;
   UINTN                               Length;
   EFI_STATUS                          Status;
   UINT8                               *TmpBuffer;
@@ -4581,13 +4584,14 @@
   // <BlockConfig> ::= 'OFFSET='<Number>&'WIDTH='<Number>&'VALUE='<Number>
   //
   while (*StringPtr != 0 && StrnCmp (StringPtr, L"&OFFSET=", StrLen 
(L"&OFFSET=")) == 0) {
+    TmpPtr     = StringPtr;
     StringPtr += StrLen (L"&OFFSET=");
     //
     // Get Offset
     //
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
     if (EFI_ERROR (Status)) {
-      *Progress = ConfigResp;
+      *Progress = TmpPtr;
       goto Exit;
     }
     Offset = 0;
@@ -4600,7 +4604,7 @@
 
     StringPtr += Length;
     if (StrnCmp (StringPtr, L"&WIDTH=", StrLen (L"&WIDTH=")) != 0) {
-      *Progress = StringPtr - Length - StrLen (L"&OFFSET=");
+      *Progress = TmpPtr;
       Status = EFI_INVALID_PARAMETER;
       goto Exit;
     }
@@ -4611,7 +4615,7 @@
     //
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
     if (EFI_ERROR (Status)) {
-      *Progress = ConfigResp;
+      *Progress = TmpPtr;
       goto Exit;
     }
     Width = 0;
@@ -4624,7 +4628,7 @@
 
     StringPtr += Length;
     if (StrnCmp (StringPtr, L"&VALUE=", StrLen (L"&VALUE=")) != 0) {
-      *Progress = StringPtr - Length - StrLen (L"&WIDTH=");
+      *Progress = TmpPtr;
       Status = EFI_INVALID_PARAMETER;
       goto Exit;
     }
@@ -4635,13 +4639,13 @@
     //
     Status = GetValueOfNumber (StringPtr, &Value, &Length);
     if (EFI_ERROR (Status)) {
-      *Progress = ConfigResp;
+      *Progress = TmpPtr;
       goto Exit;
     }
 
     StringPtr += Length;
     if (*StringPtr != 0 && *StringPtr != L'&') {
-      *Progress = StringPtr - Length - StrLen (L"&VALUE=");
+      *Progress = TmpPtr;
       Status = EFI_INVALID_PARAMETER;
       goto Exit;
     }

Modified: trunk/edk2/MdePkg/Include/Protocol/HiiConfigRouting.h
===================================================================
--- trunk/edk2/MdePkg/Include/Protocol/HiiConfigRouting.h       2013-08-23 
05:49:50 UTC (rev 14592)
+++ trunk/edk2/MdePkg/Include/Protocol/HiiConfigRouting.h       2013-08-23 
05:53:04 UTC (rev 14593)
@@ -5,7 +5,7 @@
   information from configuration applications, routing the
   results to the appropriate drivers.
   
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials are licensed and made available 
under 
 the terms and conditions of the BSD License that accompanies this 
distribution.  
 The full text of the license may be found at
@@ -99,9 +99,14 @@
                                   to the most recent & before the
                                   error, or the beginning of the
                                   string.
-  @retval EFI_INVALID_PARAMETER   Unknown name.
+  @retval EFI_INVALID_PARAMETER   The ExtractConfig function of the
+                                  underlying HII Configuration 
+                                  Access Protocol returned 
+                                  EFI_INVALID_PARAMETER. Progress
+                                  set to most recent & before the
+                                  error or the beginning of the
+                                  string.
 
-
 **/
 typedef
 EFI_STATUS

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to