## @file\r
-# This file is used to define class objects of INF file [Binaries] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Binaries] section.\r
+# It will consumed by InfParser.\r
#\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
#\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
self.Family = Family\r
def GetFamily(self):\r
return self.Family\r
- \r
+\r
def SetGuidValue(self, GuidValue):\r
self.GuidValue = GuidValue\r
def GetGuidValue(self):\r
Line=VerCurrentLine.GetLineNo(),\r
ExtraData=VerCurrentLine.GetLineString())\r
#\r
- # Validate Feature Flag Express \r
+ # Validate Feature Flag Express\r
#\r
FeatureFlagRtv = IsValidFeatureFlagExp(VerContent[3].\\r
strip())\r
#\r
# Determine binary file name duplicate. Follow below rule:\r
#\r
- # A binary filename must not be duplicated within \r
- # a [Binaries] section. A binary filename may appear in \r
- # multiple architectural [Binaries] sections. A binary \r
- # filename listed in an architectural [Binaries] section \r
- # must not be listed in the common architectural \r
+ # A binary filename must not be duplicated within\r
+ # a [Binaries] section. A binary filename may appear in\r
+ # multiple architectural [Binaries] sections. A binary\r
+ # filename listed in an architectural [Binaries] section\r
+ # must not be listed in the common architectural\r
# [Binaries] section.\r
- # \r
+ #\r
# NOTE: This check will not report error now.\r
- # \r
+ #\r
for Item in self.Binaries:\r
if Item.GetFileName() == InfBianryVerItemObj.GetFileName():\r
ItemSupArchList = Item.GetSupArchList()\r
Line=CurrentLineOfItem.GetLineNo(),\r
ExtraData=CurrentLineOfItem.GetLineString())\r
return False\r
- \r
+\r
if len(ItemContent) > 7:\r
Logger.Error("InfParser",\r
ToolError.FORMAT_INVALID,\r
BinaryFileType = ItemContent[0].strip()\r
if BinaryFileType == 'RAW' or BinaryFileType == 'ACPI' or BinaryFileType == 'ASL':\r
BinaryFileType = 'BIN'\r
- \r
+\r
if BinaryFileType not in DT.BINARY_FILE_TYPE_LIST:\r
Logger.Error("InfParser",\r
ToolError.FORMAT_INVALID,\r
File=CurrentLineOfItem.GetFileName(),\r
Line=CurrentLineOfItem.GetLineNo(),\r
ExtraData=CurrentLineOfItem.GetLineString())\r
- \r
+\r
if BinaryFileType == 'SUBTYPE_GUID':\r
BinaryFileType = 'FREEFORM'\r
- \r
+\r
if BinaryFileType == 'LIB' or BinaryFileType == 'UEFI_APP':\r
Logger.Error("InfParser",\r
ToolError.FORMAT_INVALID,\r
#\r
if BinaryFileType != 'FREEFORM':\r
InfBianryCommonItemObj.SetTarget(ItemContent[2])\r
- \r
+\r
if len(ItemContent) >= 4:\r
#\r
# Add Family information\r
InfBianryCommonItemObj.SetFamily(ItemContent[3])\r
else:\r
InfBianryCommonItemObj.SetTarget(ItemContent[3])\r
- \r
+\r
if len(ItemContent) >= 5:\r
#\r
- # TagName entries are build system specific. If there \r
- # is content in the entry, the tool must exit \r
+ # TagName entries are build system specific. If there\r
+ # is content in the entry, the tool must exit\r
# gracefully with an error message that indicates build\r
- # system specific content cannot be distributed using \r
+ # system specific content cannot be distributed using\r
# the UDP\r
#\r
if BinaryFileType != 'FREEFORM':\r
ExtraData=CurrentLineOfItem.GetLineString())\r
else:\r
InfBianryCommonItemObj.SetFamily(ItemContent[4])\r
- \r
+\r
if len(ItemContent) >= 6:\r
#\r
# Add FeatureFlagExp\r
Line=CurrentLineOfItem.GetLineNo(),\r
ExtraData=CurrentLineOfItem.GetLineString())\r
#\r
- # Validate Feature Flag Express \r
+ # Validate Feature Flag Express\r
#\r
FeatureFlagRtv = IsValidFeatureFlagExp(ItemContent[5].strip())\r
if not FeatureFlagRtv[0]:\r
File=CurrentLineOfItem.GetFileName(),\r
Line=CurrentLineOfItem.GetLineNo(),\r
ExtraData=CurrentLineOfItem.GetLineString())\r
- \r
+\r
if len(ItemContent) == 7:\r
if ItemContent[6].strip() == '':\r
Logger.Error("InfParser",\r
Line=CurrentLineOfItem.GetLineNo(),\r
ExtraData=CurrentLineOfItem.GetLineString())\r
#\r
- # Validate Feature Flag Express \r
+ # Validate Feature Flag Express\r
#\r
FeatureFlagRtv = IsValidFeatureFlagExp(ItemContent[6].strip())\r
if not FeatureFlagRtv[0]:\r
#\r
# Determine binary file name duplicate. Follow below rule:\r
#\r
- # A binary filename must not be duplicated within \r
- # a [Binaries] section. A binary filename may appear in \r
- # multiple architectural [Binaries] sections. A binary \r
- # filename listed in an architectural [Binaries] section \r
- # must not be listed in the common architectural \r
+ # A binary filename must not be duplicated within\r
+ # a [Binaries] section. A binary filename may appear in\r
+ # multiple architectural [Binaries] sections. A binary\r
+ # filename listed in an architectural [Binaries] section\r
+ # must not be listed in the common architectural\r
# [Binaries] section.\r
- # \r
+ #\r
# NOTE: This check will not report error now.\r
- # \r
+ #\r
# for Item in self.Binaries:\r
# if Item.GetFileName() == InfBianryCommonItemObj.GetFileName():\r
# ItemSupArchList = Item.GetSupArchList()\r
for ArchItem in ArchList:\r
#\r
# Validate Arch\r
- # \r
+ #\r
if (ArchItem == '' or ArchItem is None):\r
ArchItem = 'COMMON'\r
__SupArchList.append(ArchItem)\r
if len(UiInf) > 0:\r
#\r
# Check UI\r
- # \r
+ #\r
for UiItem in UiInf:\r
IsValidFileFlag = False\r
InfBianryUiItemObj = None\r
Line=UiCurrentLine.GetLineNo(),\r
ExtraData=UiCurrentLine.GetLineString())\r
#\r
- # Validate Feature Flag Express \r
+ # Validate Feature Flag Express\r
#\r
FeatureFlagRtv = IsValidFeatureFlagExp(UiContent[3].strip())\r
if not FeatureFlagRtv[0]:\r
#\r
# Determine binary file name duplicate. Follow below rule:\r
#\r
- # A binary filename must not be duplicated within \r
- # a [Binaries] section. A binary filename may appear in \r
- # multiple architectural [Binaries] sections. A binary \r
- # filename listed in an architectural [Binaries] section \r
- # must not be listed in the common architectural \r
+ # A binary filename must not be duplicated within\r
+ # a [Binaries] section. A binary filename may appear in\r
+ # multiple architectural [Binaries] sections. A binary\r
+ # filename listed in an architectural [Binaries] section\r
+ # must not be listed in the common architectural\r
# [Binaries] section.\r
- # \r
+ #\r
# NOTE: This check will not report error now.\r
- # \r
+ #\r
# for Item in self.Binaries:\r
# if Item.GetFileName() == InfBianryUiItemObj.GetFileName():\r
# ItemSupArchList = Item.GetSupArchList()\r