]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c
Program SD Cards into 4-bit mode (support for this is required in the spec). This...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / SectionExtractionDxe / SectionExtraction.c
index 6bab4db1f091dd5adf66982bbf2a9542b000d783..75fc456f8a97841cf37d005dcd63dcd2093622a7 100644 (file)
@@ -27,8 +27,8 @@
   3) A support protocol is not found, and the data is not available to be read\r
      without it.  This results in EFI_PROTOCOL_ERROR.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 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
 http://opensource.org/licenses/bsd-license.php\r
@@ -327,7 +327,7 @@ OpenSectionStreamEx (
   )\r
 {\r
   FRAMEWORK_SECTION_STREAM_NODE    *NewStream;\r
-  EFI_TPL                     OldTpl;\r
+  EFI_TPL                          OldTpl;\r
   \r
   //\r
   // Allocate a new stream\r
@@ -446,8 +446,8 @@ BOOLEAN
 ChildIsType (\r
   IN FRAMEWORK_SECTION_STREAM_NODE *Stream,\r
   IN FRAMEWORK_SECTION_CHILD_NODE  *Child,\r
-  IN EFI_SECTION_TYPE         SearchType,\r
-  IN EFI_GUID                 *SectionDefinitionGuid\r
+  IN EFI_SECTION_TYPE              SearchType,\r
+  IN EFI_GUID                      *SectionDefinitionGuid\r
   )\r
 {\r
   EFI_GUID_DEFINED_SECTION    *GuidedSection;\r
@@ -458,7 +458,7 @@ ChildIsType (
   if (Child->Type != SearchType) {\r
     return FALSE;\r
   }\r
-  if (SearchType != EFI_SECTION_GUID_DEFINED) {\r
+  if ((SearchType != EFI_SECTION_GUID_DEFINED) || (SectionDefinitionGuid == NULL)) {\r
     return TRUE;\r
   }\r
   GuidedSection = (EFI_GUID_DEFINED_SECTION * )(Stream->StreamBuffer + Child->OffsetInStream);\r
@@ -1155,11 +1155,11 @@ GetSection (
   OUT UINT32                                            *AuthenticationStatus\r
   )\r
 {\r
-  FRAMEWORK_SECTION_STREAM_NODE                              *StreamNode;\r
+  FRAMEWORK_SECTION_STREAM_NODE                         *StreamNode;\r
   EFI_TPL                                               OldTpl;\r
   EFI_STATUS                                            Status;\r
-  FRAMEWORK_SECTION_CHILD_NODE                               *ChildNode;\r
-  FRAMEWORK_SECTION_STREAM_NODE                              *ChildStreamNode;\r
+  FRAMEWORK_SECTION_CHILD_NODE                          *ChildNode;\r
+  FRAMEWORK_SECTION_STREAM_NODE                         *ChildStreamNode;\r
   UINTN                                                 CopySize;\r
   UINT32                                                ExtractedAuthenticationStatus;\r
   UINTN                                                 Instance;\r