From nobody Fri May 3 23:28:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1528945301557206.59348879841957; Wed, 13 Jun 2018 20:01:41 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BCF8021191F50; Wed, 13 Jun 2018 20:01:40 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E532921165273 for ; Wed, 13 Jun 2018 20:01:38 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 20:01:38 -0700 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.110]) by orsmga002.jf.intel.com with ESMTP; 13 Jun 2018 20:01:37 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,221,1526367600"; d="scan'208";a="66848642" From: BobCF To: edk2-devel@lists.01.org Date: Thu, 14 Jun 2018 11:01:23 +0800 Message-Id: <20180614030123.55508-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [edk2] [Patch] BaseTool: Fixed the bug of Boolean Hii Pcd packing. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When packing HiiPcd into PcdNvStoreDefaultValueBuffer, The boolean type pcd value packing incorrect. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Reviewed-by: Liming Gao --- 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/P= ython/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 +=3D pack("=3DB",int(value_char,16)) data_len +=3D len(tail.split(",")) elif data_type =3D=3D "BOOLEAN": - Buffer +=3D pack("=3DB",True) if var_value.upper() =3D=3D "TRU= E" else pack("=3DB",False) + Buffer +=3D pack("=3DB",True) if var_value.upper() in ["TRUE",= "1"] else pack("=3DB",False) data_len +=3D 1 elif data_type =3D=3D DataType.TAB_UINT8: Buffer +=3D pack("=3DB",GetIntegerValue(var_value)) data_len +=3D 1 elif data_type =3D=3D DataType.TAB_UINT16: --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel