[edk2-devel] [PATCH V2 4/6] MdeModulePkg/ResetUtilityLib: Replace the reset data difinition

Gao, Zhichao zhichao.gao at intel.com
Wed May 8 04:49:37 UTC 2019


REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1772

Replace the definition of 'RESET_UTILITY_GUID_SPECIFIC_RESET_DATA'
with 'RESET_DATA_WITH_NULL_STRING'.

Cc: Jian J Wang <jian.j.wang at intel.com>
Cc: Hao Wu <hao.a.wu at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Star Zeng <star.zeng at intel.com>
Cc: Liming Gao <liming.gao at intel.com>
Cc: Sean Brogan <sean.brogan at microsoft.com>
Cc: Michael Turner <Michael.Turner at microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
---
 .../Library/ResetUtilityLib/ResetUtility.c        | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
index 2b5af4b95a..1bf8a694fb 100644
--- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
+++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
@@ -13,15 +13,6 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/ResetSystemLib.h>
 
-#pragma pack(1)
-typedef struct {
-  CHAR16 NullTerminator;
-  GUID   ResetSubtype;
-} RESET_UTILITY_GUID_SPECIFIC_RESET_DATA;
-#pragma pack()
-
-VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
-
 /**
   This is a shorthand helper function to reset with reset type and a subtype
   so that the caller doesn't have to bother with a function that has half
@@ -46,11 +37,11 @@ ResetSystemWithSubtype (
   IN CONST  GUID        *ResetSubtype
   )
 {
-  RESET_UTILITY_GUID_SPECIFIC_RESET_DATA  ResetData;
+  RESET_DATA_WITH_NULL_STRING   ResetData;
 
-  ResetData.NullTerminator = CHAR_NULL;
+  ResetData.NullString = CHAR_NULL;
   CopyGuid (
-    (GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, ResetSubtype)),
+    (GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_DATA_WITH_NULL_STRING, ResetGuid)),
     ResetSubtype
     );
 
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40174): https://edk2.groups.io/g/devel/message/40174
Mute This Topic: https://groups.io/mt/31540325/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list