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:
parent
4b2e98e238
commit
7c44ed3e58
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user