From 372f583d359a5bdcbbe7268809c8d1dc179c64d2 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Fri, 12 Jun 2015 16:02:52 +0100 Subject: [PATCH] guest/init: update reboot() call The reboot() call that guest/init used was an older version, the manpage talks about libc4 and libc5. Update it to the current version exported by glibc by using the right include file and adjusting the parameter. This also fixed GCC 5.1.0 compile, because linux/reboot.h misses the actual prototype. Signed-off-by: Andre Przywara Signed-off-by: Will Deacon --- guest/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guest/init.c b/guest/init.c index 93dfb68..7277a07 100644 --- a/guest/init.c +++ b/guest/init.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include static int run_process(char *filename) { @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) } while (corpse != child); } - reboot(LINUX_REBOOT_CMD_RESTART); + reboot(RB_AUTOBOOT); printf("Init failed: %s\n", strerror(errno));