BaseTools: standardize GUID and pack size
currently GUID packing and pack size determination is spread throughout the code. This introduces a shared function and dict and routes all code paths through them. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
31ff1c443e
commit
d0a0c52c22
@ -298,7 +298,7 @@ class DepexParser(object):
|
||||
Statement = gOpCodeList[struct.unpack("B", OpCode)[0]]
|
||||
if Statement in ["BEFORE", "AFTER", "PUSH"]:
|
||||
GuidValue = "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X" % \
|
||||
struct.unpack("=LHHBBBBBBBB", DepexFile.read(16))
|
||||
struct.unpack(PACK_PATTERN_GUID, DepexFile.read(16))
|
||||
GuidString = self._GuidDb.get(GuidValue, GuidValue)
|
||||
Statement = "%s %s" % (Statement, GuidString)
|
||||
DepexStatement.append(Statement)
|
||||
|
Reference in New Issue
Block a user