Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
reboot.h File Reference
#include <linux/notifier.h>
#include <uapi/linux/reboot.h>
#include <asm/emergency-restart.h>

Go to the source code of this file.

Macros

#define SYS_DOWN   0x0001 /* Notify of system down */
 
#define SYS_RESTART   SYS_DOWN
 
#define SYS_HALT   0x0002 /* Notify of system halt */
 
#define SYS_POWER_OFF   0x0003 /* Notify of system power off */
 
#define POWEROFF_CMD_PATH_LEN   256
 

Functions

int register_reboot_notifier (struct notifier_block *)
 
int unregister_reboot_notifier (struct notifier_block *)
 
void machine_restart (char *cmd)
 
void machine_halt (void)
 
void machine_power_off (void)
 
void machine_shutdown (void)
 
void machine_crash_shutdown (struct pt_regs *)
 
void kernel_restart_prepare (char *cmd)
 
void kernel_restart (char *cmd)
 
void kernel_halt (void)
 
void kernel_power_off (void)
 
void ctrl_alt_del (void)
 
int orderly_poweroff (bool force)
 
void emergency_restart (void)
 

Variables

int C_A_D
 
char poweroff_cmd [POWEROFF_CMD_PATH_LEN]
 

Macro Definition Documentation

#define POWEROFF_CMD_PATH_LEN   256

Definition at line 41 of file reboot.h.

#define SYS_DOWN   0x0001 /* Notify of system down */

Definition at line 8 of file reboot.h.

#define SYS_HALT   0x0002 /* Notify of system halt */

Definition at line 10 of file reboot.h.

#define SYS_POWER_OFF   0x0003 /* Notify of system power off */

Definition at line 11 of file reboot.h.

#define SYS_RESTART   SYS_DOWN

Definition at line 9 of file reboot.h.

Function Documentation

void ctrl_alt_del ( void  )

Definition at line 530 of file sys.c.

void emergency_restart ( void  )

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.

void kernel_halt ( void  )

kernel_halt - halt the system

Shutdown everything and perform a clean system halt.

Definition at line 394 of file sys.c.

void kernel_power_off ( void  )

kernel_power_off - power_off the system

Shutdown everything and perform a clean system power_off.

Definition at line 410 of file sys.c.

void kernel_restart ( char cmd)

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)

Definition at line 320 of file sys.c.

void machine_crash_shutdown ( struct pt_regs )

Definition at line 104 of file machine_kexec.c.

void machine_halt ( void  )

Definition at line 178 of file process.c.

void machine_power_off ( void  )

Definition at line 185 of file process.c.

void machine_restart ( char cmd)

Definition at line 171 of file process.c.

void machine_shutdown ( void  )

Definition at line 240 of file process.c.

int orderly_poweroff ( bool  force)

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.

int register_reboot_notifier ( struct notifier_block nb)

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.

int unregister_reboot_notifier ( struct notifier_block nb)

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.

Variable Documentation

int C_A_D

Definition at line 116 of file sys.c.

char poweroff_cmd[POWEROFF_CMD_PATH_LEN]

Definition at line 2185 of file sys.c.