From 583c81c1c5e52520d18efc612c5e6894f4a4ed10 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 22 May 2012 18:59:47 +0200 Subject: 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 Signed-off-by: Simon Horman --- kexec/kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kexec/kexec.c') 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 #include #include +#include #include #include #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)); -- cgit