#include <linux/notifier.h>
#include <uapi/linux/reboot.h>
#include <asm/emergency-restart.h>
Go to the source code of this file.
#define POWEROFF_CMD_PATH_LEN 256 |
#define SYS_DOWN 0x0001 /* Notify of system down */ |
#define SYS_HALT 0x0002 /* Notify of system halt */ |
#define SYS_POWER_OFF 0x0003 /* Notify of system power off */ |
emergency_restart - reboot the system
Without shutting down any hardware or taking any locks reboot the system. This is called when we know we are in trouble so this is our best effort to reboot. This is safe to call in interrupt context.
Definition at line 313 of file sys.c.
kernel_halt - halt the system
Shutdown everything and perform a clean system halt.
Definition at line 394 of file sys.c.
kernel_power_off - power_off the system
Shutdown everything and perform a clean system power_off.
Definition at line 410 of file sys.c.
kernel_restart - reboot the system : pointer to buffer containing command to execute for restart or NULL
Shutdown everything and perform a clean reboot. This is not safe to call in interrupt context.
Definition at line 368 of file sys.c.
void kernel_restart_prepare |
( |
char * |
cmd | ) |
|
orderly_poweroff - Trigger an orderly system poweroff : force poweroff if command execution fails
This may be called from any context to trigger a system shutdown. If the orderly shutdown fails, it will force an immediate shutdown.
Definition at line 2225 of file sys.c.
register_reboot_notifier - Register function to be called at reboot time : Info about notifier function to be called
Registers a function with the list of functions to be called at reboot time.
Currently always returns zero, as blocking_notifier_chain_register() always returns zero.
Definition at line 339 of file sys.c.
unregister_reboot_notifier - Unregister previously registered reboot notifier : Hook to be unregistered
Unregisters a previously registered reboot notifier function.
Returns zero on success, or %-ENOENT on failure.
Definition at line 354 of file sys.c.