From 9026061ea01eaeea213b716562d5f019bd314830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20H=C3=A4user?= <8659494+mhaeuser@users.noreply.github.com> Date: Sat, 20 Mar 2021 11:49:52 +0100 Subject: [PATCH] OcResetSystemLib: Convert CRLF to LF --- Library/OcResetSystemLib/OcResetSystemLib.c | 254 +++++++++--------- Library/OcResetSystemLib/OcResetSystemLib.inf | 60 ++--- 2 files changed, 157 insertions(+), 157 deletions(-) diff --git a/Library/OcResetSystemLib/OcResetSystemLib.c b/Library/OcResetSystemLib/OcResetSystemLib.c index ad56ba00..7c453f92 100644 --- a/Library/OcResetSystemLib/OcResetSystemLib.c +++ b/Library/OcResetSystemLib/OcResetSystemLib.c @@ -1,127 +1,127 @@ -/** @file - Reset System Library instance that accounts for defective UEFI systems. - - Copyright (c) 2021, Marvin Häuser. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include - -#include -#include -#include -#include -#include - -VOID -EFIAPI -ResetCold ( - VOID - ) -{ - gRT->ResetSystem ( - EfiResetCold, - EFI_SUCCESS, - 0, - NULL - ); - // - // Attempt to perform a cold reset manually if the UEFI call does not work. - // - DirectResetCold (); - CpuDeadLoop (); -} - -VOID -EFIAPI -ResetWarm ( - VOID - ) -{ - // - // Warm resets can cause issues, reset cold instead. - // - ResetCold (); -} - -VOID -EFIAPI -ResetShutdown ( - VOID - ) -{ - gRT->ResetSystem ( - EfiResetShutdown, - EFI_SUCCESS, - 0, - NULL - ); - CpuDeadLoop (); -} - -VOID -EFIAPI -InternalResetPlatformSpecific ( - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN VOID *ResetData - ) -{ - gRT->ResetSystem ( - EfiResetPlatformSpecific, - ResetStatus, - DataSize, - ResetData - ); - ResetCold (); -} - - -VOID -EFIAPI -ResetPlatformSpecific ( - IN UINTN DataSize, - IN VOID *ResetData - ) -{ - InternalResetPlatformSpecific (EFI_SUCCESS, DataSize, ResetData); -} - -VOID -EFIAPI -ResetSystem ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN VOID *ResetData OPTIONAL - ) -{ - switch (ResetType) { - case EfiResetCold: - { - ResetCold (); - break; - } - - case EfiResetWarm: - { - ResetWarm (); - break; - } - - case EfiResetShutdown: - { - ResetShutdown (); - break; - } - - case EfiResetPlatformSpecific: - { - InternalResetPlatformSpecific (ResetStatus, DataSize, ResetData); - break; - } - } - - ASSERT (FALSE); -} +/** @file + Reset System Library instance that accounts for defective UEFI systems. + + Copyright (c) 2021, Marvin Häuser. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +#include +#include +#include +#include +#include + +VOID +EFIAPI +ResetCold ( + VOID + ) +{ + gRT->ResetSystem ( + EfiResetCold, + EFI_SUCCESS, + 0, + NULL + ); + // + // Attempt to perform a cold reset manually if the UEFI call does not work. + // + DirectResetCold (); + CpuDeadLoop (); +} + +VOID +EFIAPI +ResetWarm ( + VOID + ) +{ + // + // Warm resets can cause issues, reset cold instead. + // + ResetCold (); +} + +VOID +EFIAPI +ResetShutdown ( + VOID + ) +{ + gRT->ResetSystem ( + EfiResetShutdown, + EFI_SUCCESS, + 0, + NULL + ); + CpuDeadLoop (); +} + +VOID +EFIAPI +InternalResetPlatformSpecific ( + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData + ) +{ + gRT->ResetSystem ( + EfiResetPlatformSpecific, + ResetStatus, + DataSize, + ResetData + ); + ResetCold (); +} + + +VOID +EFIAPI +ResetPlatformSpecific ( + IN UINTN DataSize, + IN VOID *ResetData + ) +{ + InternalResetPlatformSpecific (EFI_SUCCESS, DataSize, ResetData); +} + +VOID +EFIAPI +ResetSystem ( + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL + ) +{ + switch (ResetType) { + case EfiResetCold: + { + ResetCold (); + break; + } + + case EfiResetWarm: + { + ResetWarm (); + break; + } + + case EfiResetShutdown: + { + ResetShutdown (); + break; + } + + case EfiResetPlatformSpecific: + { + InternalResetPlatformSpecific (ResetStatus, DataSize, ResetData); + break; + } + } + + ASSERT (FALSE); +} diff --git a/Library/OcResetSystemLib/OcResetSystemLib.inf b/Library/OcResetSystemLib/OcResetSystemLib.inf index 36e943ce..ded53991 100644 --- a/Library/OcResetSystemLib/OcResetSystemLib.inf +++ b/Library/OcResetSystemLib/OcResetSystemLib.inf @@ -1,30 +1,30 @@ -## @file -# Reset System Library instance that accounts for defective UEFI systems. -# -# Copyright (c) 2021, Marvin Häuser. All rights reserved.
-# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -## - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = OcResetSystemLib - FILE_GUID = BBC22992-DB8C-44F3-AA8C-B69FC2E3FB8F - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = ResetSystemLib - -[Sources] - OcResetSystemLib.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - OpenCorePkg/OpenCorePkg.dec - -[LibraryClasses] - BaseLib - DebugLib - OcDeviceMiscLib - UefiRuntimeServicesTableLib +## @file +# Reset System Library instance that accounts for defective UEFI systems. +# +# Copyright (c) 2021, Marvin Häuser. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = OcResetSystemLib + FILE_GUID = BBC22992-DB8C-44F3-AA8C-B69FC2E3FB8F + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = ResetSystemLib + +[Sources] + OcResetSystemLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + OpenCorePkg/OpenCorePkg.dec + +[LibraryClasses] + BaseLib + DebugLib + OcDeviceMiscLib + UefiRuntimeServicesTableLib