1
0
mirror of https://github.com/rancher/os.git synced 2025-06-24 22:11:33 +00:00

Merge pull request #27 from sidharthamani/master

sync file system before making power syscalls
This commit is contained in:
Darren 2015-02-20 11:50:03 -07:00
commit ada9380a91

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)
}