mirror of
https://github.com/rancher/os.git
synced 2025-06-25 06:21:33 +00:00
Merge pull request #27 from sidharthamani/master
sync file system before making power syscalls
This commit is contained in:
commit
ada9380a91
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user