From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 3801D21D1E2DE for ; Fri, 25 Aug 2017 01:54:53 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Aug 2017 01:57:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,424,1498546800"; d="scan'208";a="1210311900" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 25 Aug 2017 01:57:28 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 01:57:28 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 01:57:28 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.183]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.128]) with mapi id 14.03.0319.002; Fri, 25 Aug 2017 16:57:26 +0800 From: "Bi, Dandan" To: Wim Vervoorn , "edk2-devel@lists.01.org" Thread-Topic: HiiSetToDefaults behavior Thread-Index: AdMdeQr9ye2D90TlRY+Njw5NLMjVMAABOHbw Date: Fri, 25 Aug 2017 08:57:26 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B956C2A@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: HiiSetToDefaults behavior X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2017 08:54:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Wim Vervoorn, Current behavior of HiiSetToDefaults(): 1. For Question has the specified type default value, will set the default = value to storage for the Question. 2. For Question without the specified type default, other type default val= ue can be shared.(such as: standard default doesn't exit, but Manufacturing= Default exits, Manufacturing Default value can =20 be shared with standard default) 3. For Question without any types of default value, current implementation = will=20 (a) set first option value as the default value of oneof (b) set minimum value as the default value of numeric .... Thanks, Dandan =20 -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Wim = Vervoorn Sent: Friday, August 25, 2017 4:13 PM To: edk2-devel@lists.01.org Subject: [edk2] HiiSetToDefaults behavior Hello, I have a question about the expect behavior of HiiSetToDefaults(). So far I= haven't been able to find a clear definition of what this should do. What I expect is that this call would only touch the items that have a defa= ult defined. So what I would think is that Test2OfValue below would become = 1 and Test1OfValue would be untouched as long as it's value is either 0 or = 1 and become 1 if this is not the case. What seems to happen is that for Test1OfValue the first item is used as the= default. oneof name =3D Test1OneOf, // Define referenc= e name for Question varid =3D lIfrNVData.Test1OfValue, = // Use "DataStructure.Member" to reference Buffer Storage prompt =3D STRING_TOKEN(STR_TEST1_PROMPT), help =3D STRING_TOKEN(STR_TEST1_HELP), // // Define an option (EFI_IFR_ONE_OF_OPTION) // option text =3D STRING_TOKEN(STR_ENABLE), value =3D 1, flags =3D 0; option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags =3D 0; = endoneof; oneof name =3D Test2OneOf, // Define referenc= e name for Question varid =3D lIfrNVData.Test2OfValue, = // Use "DataStructure.Member" to reference Buffer Storage prompt =3D STRING_TOKEN(STR_TEST2_PROMPT), help =3D STRING_TOKEN(STR_TEST2_HELP), // // Define an option (EFI_IFR_ONE_OF_OPTION) // option text =3D STRING_TOKEN(STR_ENABLE), value =3D 1, flags =3D DEFA= ULT; option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags =3D 0; = endoneof; Best Regards, Wim Vervoorn Eltan B.V. Ambachtstraat 23 5481 SM Schijndel The Netherlands T : +31-(0)73-594 46 64 E : wvervoorn@eltan.com W : http://www.eltan.com "THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDE= D RECIPIENT OF THIS MESSAGE, ANY USE OF THIS MESSAGE IS STRICTLY PROHIBITED= . IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE IMMEDIATELY NOTIFY THE= SENDER BY TELEPHONE +31-(0)73-5944664 OR REPLY EMAIL, AND IMMEDIATELY DELE= TE THIS MESSAGE AND ALL COPIES." _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel