Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136933090
D17535.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
709 B
Referenced Files
None
Subscribers
None
D17535.id.diff
View Options
Index: head/stand/efi/loader/main.c
===================================================================
--- head/stand/efi/loader/main.c
+++ head/stand/efi/loader/main.c
@@ -993,6 +993,23 @@
return (EFI_SUCCESS); /* keep compiler happy */
}
+COMMAND_SET(poweroff, "poweroff", "power off the system", command_poweroff);
+
+static int
+command_poweroff(int argc __unused, char *argv[] __unused)
+{
+ int i;
+
+ for (i = 0; devsw[i] != NULL; ++i)
+ if (devsw[i]->dv_cleanup != NULL)
+ (devsw[i]->dv_cleanup)();
+
+ RS->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
+
+ /* NOTREACHED */
+ return (CMD_ERROR);
+}
+
COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot);
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 5:45 PM (3 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25782642
Default Alt Text
D17535.id.diff (709 B)
Attached To
Mode
D17535: loader.efi: add poweroff command
Attached
Detach File
Event Timeline
Log In to Comment