From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cpsmtpb-ews09.kpnxchange.com (cpsmtpb-ews09.kpnxchange.com [213.75.39.14]) by ml01.01.org (Postfix) with ESMTP id D324021D1E2D1 for ; Fri, 25 Aug 2017 01:11:15 -0700 (PDT) Received: from cpsps-ews02.kpnxchange.com ([10.94.84.169]) by cpsmtpb-ews09.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 25 Aug 2017 10:13:50 +0200 Received: from CPSMTPM-CMT102.kpnxchange.com ([195.121.3.18]) by cpsps-ews02.kpnxchange.com with Microsoft SMTPSVC(8.5.9600.16384); Fri, 25 Aug 2017 10:13:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; d=kpnmail.nl; s=kpnmail01; c=relaxed/relaxed; t=1503648830; h=mime-version:date:message-id:subject:from:to:content-type; bh=47Q4TgT2nO80zA4SUC3HDdXeAV71MF9sgjjDGta1HtA=; b=eAqQkbptg39ZiXGJTTg7Gd4A3WdW1tRFJ1NWwb81Dqlls7CoOfktZ6/YiI2UhKuI2C4Vps3ej+P DTmf2t2rLgOGnWu02VLyXdsKS+04IbWFw2gy1wPPpHAWf3NJq7cvHDkWcwOwtmg1HSePmYIgC3p+K X2xyas50oBVWlwIvqf0= Received: from Eltsrv03.Eltan.local ([84.85.114.86]) by CPSMTPM-CMT102.kpnxchange.com over TLS secured channel with Microsoft SMTPSVC(8.5.9600.16384); Fri, 25 Aug 2017 10:13:50 +0200 Received: from Eltsrv03.Eltan.local (192.168.100.3) by Eltsrv03.Eltan.local (192.168.100.3) with Microsoft SMTP Server (TLS) id 15.0.847.32; Fri, 25 Aug 2017 10:13:21 +0200 Received: from Eltsrv03.Eltan.local ([fe80::24e7:1cc6:a76a:a3a8]) by Eltsrv03.Eltan.local ([fe80::24e7:1cc6:a76a:a3a8%12]) with mapi id 15.00.0847.040; Fri, 25 Aug 2017 10:13:21 +0200 From: Wim Vervoorn To: "edk2-devel@lists.01.org" Thread-Topic: HiiSetToDefaults behavior Thread-Index: AdMdeQr9ye2D90TlRY+Njw5NLMjVMA== Date: Fri, 25 Aug 2017 08:13:21 +0000 Message-ID: Accept-Language: nl-NL, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.100.108] MIME-Version: 1.0 X-OriginalArrivalTime: 25 Aug 2017 08:13:50.0105 (UTC) FILETIME=[1518F890:01D31D7A] X-RcptDomain: lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: 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:11:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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."