MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / UniCheck

Method UniCheck

BaseTools/Source/Python/Ecc/Check.py:169–179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

167
168 # Check UNI files
169 def UniCheck(self):
170 if EccGlobalData.gConfig.GeneralCheckUni == '1' or EccGlobalData.gConfig.GeneralCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
171 EdkLogger.quiet("Checking whether UNI file is UTF-16 ...")
172 SqlCommand = """select ID, FullPath, ExtName from File where ExtName like 'uni'"""
173 RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
174 for Record in RecordSet:
175 File = Record[1]
176 FileIn = open(File, 'rb').read(2)
177 if FileIn != '\xff\xfe':
178 OtherMsg = "File %s is not a valid UTF-16 UNI file" % Record[1]
179 EccGlobalData.gDb.TblReport.Insert(ERROR_GENERAL_CHECK_UNI, OtherMsg=OtherMsg, BelongsToTable='File', BelongsToItem=Record[0])
180
181 # General Checking
182 def GeneralCheck(self):

Callers 1

GeneralCheckMethod · 0.95

Calls 2

ExecMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected