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

@ -667,6 +667,11 @@ func PtraceAttach(pid int) (errno int) { return ptrace(PTRACE_ATTACH, pid, 0, 0)
func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (errno int)
func Reboot(cmd int) (errno int) {
return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
}
// Sendto
// Recvfrom
// Socketpair
@ -842,7 +847,6 @@ func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0)
// Quotactl
// Readahead
// Readv
// Reboot
// RemapFilePages
// Removexattr
// RequestKey