diff options
| author | Joel Stanley <[email protected]> | 2015-04-15 16:16:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2015-04-15 16:35:23 -0700 |
| commit | 7a54f46b301cfab8a0d7365aa186545f8b98f22e (patch) | |
| tree | 40fe2cd79ce33d15e6fa5bcca62c92c65bc1820e /include/linux | |
| parent | 7975a9b7323d5a47e5b651bac810f3271e7156df (diff) | |
kernel/reboot.c: add orderly_reboot for graceful reboot
The kernel has orderly_poweroff which allows the kernel to initiate a
graceful shutdown of userspace, by running /sbin/poweroff. This adds
orderly_reboot that will cause userspace to shut itself down by calling
/sbin/reboot.
This will be used for shutdown initiated by a system controller on
platforms that do not use ACPI.
orderly_reboot() should be used when the system wants to allow userspace
to gracefully shut itself down. For cases where the system may imminently
catch on fire, the existing emergency_restart() provides an immediate
reboot without involving userspace.
Signed-off-by: Joel Stanley <[email protected]>
Cc: Fabian Frederick <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Jeremy Kerr <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/reboot.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 67fc8fcdc4b0..a7ff409f386d 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h @@ -70,7 +70,8 @@ void ctrl_alt_del(void); #define POWEROFF_CMD_PATH_LEN 256 extern char poweroff_cmd[POWEROFF_CMD_PATH_LEN]; -extern int orderly_poweroff(bool force); +extern void orderly_poweroff(bool force); +extern void orderly_reboot(void); /* * Emergency restart, callable from an interrupt handler. |