mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
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 <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
committed by
Will Deacon
parent
9ed717c350
commit
372f583d35
+2
-2
@@ -9,7 +9,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <sys/reboot.h>
|
||||
|
||||
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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user