[edk2,v2,2/3] MdeModulePkg: use central variable definitions in DriverSampleDxe

Message ID 20171215165925.12306-3-leif.lindholm@linaro.org
State Accepted
Commit a9b7e035ba1f02b9b50cb6f883913d6d3b532eab
Headers show
Series
  • Use central definitions for EFI_VARIABLE_*
Related show

Commit Message

Leif Lindholm Dec. 15, 2017, 4:59 p.m.
Use UefiMultiPhase.h in Vfr.vfr instead of duplicating EFI_VARIABLE_*
definitions.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

---
 MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

-- 
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Zeng, Star Dec. 17, 2017, 11:20 a.m. | #1
Reviewed-by: Star Zeng <star.zeng@intel.com>


-----Original Message-----
From: Leif Lindholm [mailto:leif.lindholm@linaro.org] 

Sent: Saturday, December 16, 2017 12:59 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: [PATCH v2 2/3] MdeModulePkg: use central variable definitions in DriverSampleDxe

Use UefiMultiPhase.h in Vfr.vfr instead of duplicating EFI_VARIABLE_* definitions.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

---
 MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index c1682913fa..b1017d9fd0 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
+++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
@@ -14,6 +14,7 @@
 //**/
 
 
+#include <Uefi/UefiMultiPhase.h>
 #include "NVDataStruc.h"
 
 //
@@ -35,14 +36,6 @@
 #define EFI_FRONT_PAGE_SUBCLASS           0x02
 #define EFI_SINGLE_USE_SUBCLASS           0x03
 
-//
-// EFI Variable attributes
-//
-#define EFI_VARIABLE_NON_VOLATILE       0x00000001
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
-#define EFI_VARIABLE_RUNTIME_ACCESS     0x00000004
-#define EFI_VARIABLE_READ_ONLY          0x00000008
-
 #define EFI_USER_INFO_ACCESS_SETUP_ADMIN_GUID \
   { 0x85b75607, 0xf7ce, 0x471e, { 0xb7, 0xe4, 0x2a, 0xea, 0x5f, 0x72, 0x32, 0xee } }
 
--
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Patch

diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index c1682913fa..b1017d9fd0 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
+++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
@@ -14,6 +14,7 @@ 
 //**/
 
 
+#include <Uefi/UefiMultiPhase.h>
 #include "NVDataStruc.h"
 
 //
@@ -35,14 +36,6 @@ 
 #define EFI_FRONT_PAGE_SUBCLASS           0x02
 #define EFI_SINGLE_USE_SUBCLASS           0x03
 
-//
-// EFI Variable attributes
-//
-#define EFI_VARIABLE_NON_VOLATILE       0x00000001
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
-#define EFI_VARIABLE_RUNTIME_ACCESS     0x00000004
-#define EFI_VARIABLE_READ_ONLY          0x00000008
-
 #define EFI_USER_INFO_ACCESS_SETUP_ADMIN_GUID \
   { 0x85b75607, 0xf7ce, 0x471e, { 0xb7, 0xe4, 0x2a, 0xea, 0x5f, 0x72, 0x32, 0xee } }