From 7b566834809c64aba0593162db9a127fb4029c27 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 13 Oct 2017 19:12:31 +0200 Subject: qemu: simplify shutdown Now that we have the watchdog, killing the watchdog process is another way of shutting down. --- src/tests/qemu/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tests/qemu/init.c b/src/tests/qemu/init.c index 3d0c9de..ecbbf75 100644 --- a/src/tests/qemu/init.c +++ b/src/tests/qemu/init.c @@ -27,11 +27,9 @@ __attribute__((noreturn)) static void poweroff(void) #if defined(__x86_64__) || defined(__i386__) ioperm(0x604, 2, 1); outw(1U << 13, 0x604); -#else - reboot(RB_POWER_OFF); #endif - sleep(30); - fprintf(stderr, "\x1b[37m\x1b[41m\x1b[1mFailed to power off!!!\x1b[0m\n"); + kill(-1, SIGKILL); + reboot(RB_POWER_OFF); exit(1); } -- cgit v1.2.3-59-g8ed1b