mirror of
https://github.com/rancher/os.git
synced 2025-08-11 11:32:28 +00:00
Merge pull request #559 from luxas/32bit
Fixed 32-bit issue in power.go
This commit is contained in:
commit
e451abd532
@ -129,7 +129,7 @@ func Halt() {
|
|||||||
reboot(syscall.LINUX_REBOOT_CMD_HALT)
|
reboot(syscall.LINUX_REBOOT_CMD_HALT)
|
||||||
}
|
}
|
||||||
|
|
||||||
func reboot(code int) {
|
func reboot(code uint) {
|
||||||
err := shutDownContainers()
|
err := shutDownContainers()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
@ -137,7 +137,7 @@ func reboot(code int) {
|
|||||||
|
|
||||||
syscall.Sync()
|
syscall.Sync()
|
||||||
|
|
||||||
err = syscall.Reboot(code)
|
err = syscall.Reboot(int(code))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user