diff options
author | maximilian attems <max@stro.at> | 2012-05-22 18:59:47 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-07-13 15:33:52 +0900 |
commit | 583c81c1c5e52520d18efc612c5e6894f4a4ed10 (patch) | |
tree | 9c5bcc731efcc1ca8a1fd5c3799b2d9a935eb3c7 /kexec/kexec.c | |
parent | f429692c74c7ebd674b9d378326aab1b5d0225ed (diff) |
kexec: simply pass LINUX_REBOOT_CMD_KEXEC to reboot
While trying to port kexec cleanly to klibc,
came across this syscall usage for reboot(2).
Calling reboot directly simplifies the code.
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r-- | kexec/kexec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c index 5ab0196..8928be0 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -28,6 +28,7 @@ #include <limits.h> #include <sys/types.h> #include <sys/stat.h> +#include <sys/reboot.h> #include <unistd.h> #include <fcntl.h> #ifndef _O_BINARY @@ -822,7 +823,7 @@ static int my_shutdown(void) */ static int my_exec(void) { - kexec_reboot(); + reboot(LINUX_REBOOT_CMD_KEXEC); /* I have failed if I make it here */ fprintf(stderr, "kexec failed: %s\n", strerror(errno)); |