diff options
author | Casper Ti. Vector | 2015-11-19 03:52:14 +0100 |
---|---|---|
committer | Karel Zak | 2015-11-19 12:07:04 +0100 |
commit | e52b58e6277141ffd3d196b636515096d7a1ce44 (patch) | |
tree | 8bb13e72f3b7db1fdb71713fe6b327a2310b2c1f /sys-utils/ctrlaltdel.c | |
parent | losetup: clean up --direct-io (diff) | |
download | kernel-qcow2-util-linux-e52b58e6277141ffd3d196b636515096d7a1ce44.tar.gz kernel-qcow2-util-linux-e52b58e6277141ffd3d196b636515096d7a1ce44.tar.xz kernel-qcow2-util-linux-e52b58e6277141ffd3d196b636515096d7a1ce44.zip |
ctrlaltdel: use reboot() provided by libc, assuming it is 1-adic.
Diffstat (limited to 'sys-utils/ctrlaltdel.c')
-rw-r--r-- | sys-utils/ctrlaltdel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys-utils/ctrlaltdel.c b/sys-utils/ctrlaltdel.c index 438892585..4a6958485 100644 --- a/sys-utils/ctrlaltdel.c +++ b/sys-utils/ctrlaltdel.c @@ -10,13 +10,17 @@ #include <stdlib.h> #include <string.h> #include <errno.h> -#include "linux_reboot.h" +#include <unistd.h> +#include <sys/reboot.h> #include "nls.h" #include "c.h" #include "closestream.h" #include "pathnames.h" #include "path.h" +#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF +#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000 + static void __attribute__ ((__noreturn__)) usage(FILE * out) { fprintf(out, USAGE_HEADER); @@ -67,7 +71,7 @@ static int set_cad(const char *arg) warnx(_("unknown argument: %s"), arg); return EXIT_FAILURE; } - if (my_reboot(cmd) < 0) { + if (reboot(cmd) < 0) { warnx("reboot"); return EXIT_FAILURE; } |