]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DriverSampleDxe: Refine the sample case for UNION type
authorDandan Bi <dandan.bi@intel.com>
Wed, 7 Mar 2018 02:34:00 +0000 (10:34 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 8 Mar 2018 00:58:47 +0000 (08:58 +0800)
The example of UNION storage is not good, now update it.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni

index 6f092de8b637dae71e2860dc096e08333886cf8c..208a4c6d915180edbbb95a7c926034f89fec1cfc 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -53,8 +53,8 @@ typedef struct {
 } MY_BITS_DATA;\r
 \r
 typedef union {\r
-  UINT16   BitField : 10;\r
-  UINT8    ByteField;\r
+  UINT8    UnionNumeric;\r
+  UINT8    UnionNumericAlias;\r
 } MY_EFI_UNION_DATA;\r
 \r
 typedef struct {\r
index b1017d9fd07151e93a35a7b757a31bd5908faaa6..9d99dcf205e3b078f36e9bb273b2b150c3fb9894 100644 (file)
@@ -2,7 +2,7 @@
 //\r
 //    Sample Setup formset.\r
 //\r
-//  Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+//  Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //  This program and the accompanying materials\r
 //  are licensed and made available under the terms and conditions of the BSD License\r
 //  which accompanies this distribution.  The full text of the license may be found at\r
@@ -915,7 +915,7 @@ formset
     subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);\r
     subtitle text = STRING_TOKEN(STR_UNION_EFI_VARSTORE);\r
 \r
-    numeric varid   = MyEfiUnionVar.ByteField,\r
+    numeric varid   = MyEfiUnionVar.UnionNumeric,\r
             prompt  = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_PROMPT),\r
             help    = STRING_TOKEN(STR_UNION_BYTE_NUMERIC_HELP),\r
             minimum = 0,\r
@@ -925,16 +925,6 @@ formset
             default = 8, defaultstore = MyManufactureDefault,\r
     endnumeric;\r
 \r
-    numeric varid   = MyEfiUnionVar.BitField,\r
-            prompt  = STRING_TOKEN(STR_UNION_BIT_NUMERIC_PROMPT),\r
-            help    = STRING_TOKEN(STR_UNION_BIT_NUMERIC_HELP),\r
-            minimum = 0,\r
-            maximum = 20,\r
-            step    = 0,\r
-            default = 7, defaultstore = MyStandardDefault,\r
-            default = 8, defaultstore = MyManufactureDefault,\r
-    endnumeric;\r
-\r
     guidop\r
       guid = DRIVER_SAMPLE_FORMSET_GUID,\r
       datatype = MY_EFI_BITS_VARSTORE_DATA,\r
index 7cc6a19e935d046694ba8f3f052c8a4ee8533780..2215c08c5ac10318e281c190c92f0f91de1889ca 100644 (file)
@@ -1,6 +1,6 @@
 // *++\r
        //\r
-// Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 // This program and the accompanying materials                          \r
 // are licensed and made available under the terms and conditions of the BSD License         \r
 // which accompanies this distribution.  The full text of the license may be found at        \r
                                        #language fr-FR "UNION EfiVarStore byte numeric"\r
 #string STR_UNION_BYTE_NUMERIC_HELP    #language en-US "Question refer to byte field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"\r
                                        #language fr-FR "Question refer to byte field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"\r
-#string STR_UNION_BIT_NUMERIC_PROMPT   #language en-US "UNION EfiVarStore bit numeric"\r
-                                       #language fr-FR "UNION EfiVarStore bit numeric"\r
-#string STR_UNION_BIT_NUMERIC_HELP     #language en-US "Question refer to bit field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"\r
-                                       #language fr-FR "Question refer to bit field in UNION type efivastore, the Standard default is 7 Manufacture default is 8"\r
 // Boot Order\r
 #string STR_BOOT_TITLE                 #language en-US "Boot"\r
 #string STR_BOOT_OPTIONS               #language en-US "Boot Order"\r