syscall: implement Reboot for linux.

The published interface is the simple version of the syscall,
allowing all reboot functions except for the esoteric
LINUX_REBOOT_CMD_RESTART2.

R=golang-dev, bradfitzgo, bradfitzwork
CC=golang-dev
https://golang.org/cl/4256060
This commit is contained in:
David Anderson 2011-03-09 05:45:08 -08:00 committed by Brad Fitzpatrick
parent 78879b3b8b
commit 05660b79ea
8 changed files with 62 additions and 1 deletions

View file

@ -408,6 +408,16 @@ const (
IP_TOS = 0x1
IP_TTL = 0x2
IP_UNBLOCK_SOURCE = 0x25
LINUX_REBOOT_CMD_CAD_OFF = 0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
LINUX_REBOOT_CMD_KEXEC = 0x45584543
LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
LINUX_REBOOT_CMD_RESTART = 0x1234567
LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
LINUX_REBOOT_MAGIC1 = 0xfee1dead
LINUX_REBOOT_MAGIC2 = 0x28121969
MAP_32BIT = 0x40
MAP_ANON = 0x20
MAP_ANONYMOUS = 0x20