summarylogtreecommitdiffstats
path: root/poweroff.c
diff options
context:
space:
mode:
authorsee pkgbuild2019-05-21 14:26:07 +0000
committersee pkgbuild2019-05-21 15:35:06 +0000
commit2d3fa7d67bd62a807c849d42a6ad30eaa5188add (patch)
tree99a3fc775f7620e19dbc8f16e2410fe37957430a /poweroff.c
downloadaur-2d3fa7d67bd62a807c849d42a6ad30eaa5188add.tar.gz
Initial upload of the package
Diffstat (limited to 'poweroff.c')
-rw-r--r--poweroff.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/poweroff.c b/poweroff.c
new file mode 100644
index 00000000000..2230d27b089
--- /dev/null
+++ b/poweroff.c
@@ -0,0 +1,10 @@
+#include <efi.h>
+#include <efilib.h>
+
+EFI_STATUS
+EFIAPI
+efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
+ InitializeLib(ImageHandle, SystemTable);
+ return uefi_call_wrapper(SystemTable->RuntimeServices->ResetSystem, 4,
+ EfiResetShutdown, EFI_SUCCESS, sizeof(NULL), NULL);
+}