mirror of
https://github.com/rancher/os.git
synced 2025-09-17 23:48:09 +00:00
sync file system before making power syscalls
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user