Reviewed-by: Liming Gao <[email protected]> >-----Original Message----- >From: Feng, Bob C >Sent: Thursday, June 14, 2018 11:01 AM >To: [email protected] >Cc: Feng, Bob C <[email protected]>; Gao, Liming <[email protected]> >Subject: [Patch] BaseTool: Fixed the bug of Boolean Hii Pcd packing. > >When packing HiiPcd into PcdNvStoreDefaultValueBuffer, >The boolean type pcd value packing incorrect. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Bob Feng <[email protected]> >Cc: Liming Gao <[email protected]> >--- > BaseTools/Source/Python/AutoGen/GenVar.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py >b/BaseTools/Source/Python/AutoGen/GenVar.py >index 3675be8de9..bf3d225c21 100644 >--- a/BaseTools/Source/Python/AutoGen/GenVar.py >+++ b/BaseTools/Source/Python/AutoGen/GenVar.py >@@ -294,11 +294,11 @@ class VariableMgr(object): > if tail: > for value_char in tail.split(","): > Buffer += pack("=B",int(value_char,16)) > data_len += len(tail.split(",")) > elif data_type == "BOOLEAN": >- Buffer += pack("=B",True) if var_value.upper() == "TRUE" else >pack("=B",False) >+ Buffer += pack("=B",True) if var_value.upper() in ["TRUE","1"] >else >pack("=B",False) > data_len += 1 > elif data_type == DataType.TAB_UINT8: > Buffer += pack("=B",GetIntegerValue(var_value)) > data_len += 1 > elif data_type == DataType.TAB_UINT16: >-- >2.16.2.windows.1
_______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

