1
0
mirror of https://github.com/rancher/os.git synced 2025-06-25 22:41:36 +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() { func PowerOff() {
syscall.Sync()
reboot(syscall.LINUX_REBOOT_CMD_POWER_OFF) reboot(syscall.LINUX_REBOOT_CMD_POWER_OFF)
} }
func Reboot() { func Reboot() {
syscall.Sync()
reboot(syscall.LINUX_REBOOT_CMD_RESTART) reboot(syscall.LINUX_REBOOT_CMD_RESTART)
} }
func Halt() { func Halt() {
syscall.Sync()
reboot(syscall.LINUX_REBOOT_CMD_HALT) reboot(syscall.LINUX_REBOOT_CMD_HALT)
} }