OpenCore
1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ResetSystem.c
Go to the documentation of this file.
1
8
#include <
Library/OcBootManagementLib.h
>
9
#include <
Library/OcMiscLib.h
>
10
#include <Library/UefiApplicationEntryPoint.h>
11
#include <Library/UefiLib.h>
12
13
EFI_STATUS
14
EFIAPI
15
UefiMain
(
16
IN EFI_HANDLE ImageHandle,
17
IN EFI_SYSTEM_TABLE *SystemTable
18
)
19
{
20
EFI_STATUS Status;
21
UINTN Argc;
22
CHAR16 **Argv;
23
CHAR16 *Mode;
24
25
Status =
GetArguments
(&Argc, &Argv);
26
if
(!EFI_ERROR (Status) && (Argc >= 2)) {
27
Mode = Argv[1];
28
}
else
{
29
DEBUG ((DEBUG_INFO,
"OCRST: Assuming default to be coldreset - %r\n"
, Status));
30
Mode = L
"coldreset"
;
31
}
32
33
return
OcResetSystem
(Mode);
34
}
OcBootManagementLib.h
OcResetSystem
EFI_STATUS EFIAPI OcResetSystem(IN CHAR16 *Mode)
Definition
OcResetSystem.c:55
OcMiscLib.h
GetArguments
EFI_STATUS GetArguments(OUT UINTN *Argc, OUT CHAR16 ***Argv)
Definition
ProtocolSupport.c:25
UefiMain
EFI_STATUS EFIAPI UefiMain(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition
ResetSystem.c:15
Application
ResetSystem
ResetSystem.c
Generated by
1.12.0