commit a0858fa9e87a63e8b87b518aef6081053360178a
parent 1a090bf1eb6836e28cc036202464965c3f936e15
Author: sin <sin@2f30.org>
Date: Wed, 4 Sep 2013 13:46:45 +0100
Do not use hard-coded values in halt.c and reboot.c
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/halt.c b/halt.c
@@ -33,8 +33,8 @@ main(int argc, char *argv[])
if (pflag)
cmd = LINUX_REBOOT_CMD_POWER_OFF;
- if (syscall(__NR_reboot, 0xfee1dead, 672274793,
- cmd, NULL) < 0)
+ if (syscall(__NR_reboot, LINUX_REBOOT_MAGIC1,
+ LINUX_REBOOT_MAGIC2, cmd, NULL) < 0)
eprintf("reboot:");
return 0;
}
diff --git a/reboot.c b/reboot.c
@@ -24,7 +24,8 @@ main(int argc, char *argv[])
sync();
- if (syscall(__NR_reboot, 0xfee1dead, 672274793,
+ if (syscall(__NR_reboot, LINUX_REBOOT_MAGIC1,
+ LINUX_REBOOT_MAGIC2,
LINUX_REBOOT_CMD_RESTART, NULL) < 0)
eprintf("reboot:");
return 0;