OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ResetSystem.c
Go to the documentation of this file.
1
9#include <Library/OcMiscLib.h>
10#include <Library/UefiApplicationEntryPoint.h>
11#include <Library/UefiLib.h>
12
13EFI_STATUS
14EFIAPI
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}
EFI_STATUS EFIAPI OcResetSystem(IN CHAR16 *Mode)
EFI_STATUS GetArguments(OUT UINTN *Argc, OUT CHAR16 ***Argv)
EFI_STATUS EFIAPI UefiMain(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition ResetSystem.c:15