1
0
mirror of https://github.com/rancher/os.git synced 2025-08-02 07:24:28 +00:00

sync file system before making power syscalls

This commit is contained in:
sidharthamani 2015-02-20 10:48:18 -08:00
parent 4b2e98e238
commit 7c44ed3e58

View File

@ -17,14 +17,17 @@ const (
)
func PowerOff() {
syscall.Sync()
reboot(syscall.LINUX_REBOOT_CMD_POWER_OFF)
}
func Reboot() {
syscall.Sync()
reboot(syscall.LINUX_REBOOT_CMD_RESTART)
}
func Halt() {
syscall.Sync()
reboot(syscall.LINUX_REBOOT_CMD_HALT)
}