This doesn’t work on the Raspberry Pi yet (due to missing kexec_file_load), but I tested it in qemu.
10 lines
142 B
Go
10 lines
142 B
Go
// +build !amd64
|
|
|
|
package gokrazy
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
func reboot() error {
|
|
return unix.Reboot(unix.LINUX_REBOOT_CMD_RESTART)
|
|
}
|