From 5dc9e5261a67266b6b9f5cfdd95baeba0c808d80 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 24 Aug 2017 16:06:11 +0200 Subject: startup: Don't spin on host_reboot failures. * startup/startup.c (reboot_mach): Do not retry needlessly if host_reboot fails. --- startup/startup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'startup') diff --git a/startup/startup.c b/startup/startup.c index 109ed486..7c3fbf0b 100644 --- a/startup/startup.c +++ b/startup/startup.c @@ -189,9 +189,10 @@ reboot_mach (int flags) fprintf (stderr, "%s: %sing Mach (flags %#x)...\n", program_invocation_short_name, BOOT (flags), flags); sleep (5); - while ((err = host_reboot (host_priv, flags))) - error (0, err, "reboot"); - for (;;); + err = host_reboot (host_priv, flags); + if (err) + error (1, err, "reboot"); + for (;;) sleep (1); } } -- cgit v1.2.3