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 <[email protected]> Cc: Hao Wu <[email protected]> Cc: Ray Ni <[email protected]> Cc: Star Zeng <[email protected]> Cc: Liming Gao <[email protected]> Cc: Sean Brogan <[email protected]> Cc: Michael Turner <[email protected]> Cc: Bret Barkelew <[email protected]> Signed-off-by: Zhichao Gao <[email protected]> --- .../Library/ResetUtilityLib/ResetUtility.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c index 2b5af4b95a..c420e0e36a 100644 --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c @@ -12,15 +12,7 @@ #include <Library/DebugLib.h> #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); +#include <Guid/CapsuleResetData.h> /** This is a shorthand helper function to reset with reset type and a subtype @@ -46,11 +38,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 (#39998): https://edk2.groups.io/g/devel/message/39998 Mute This Topic: https://groups.io/mt/31507361/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
