mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
78879b3b8b
commit
05660b79ea
8 changed files with 62 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue