From: Jeremy Kerr Date: Wed, 1 May 2013 08:53:20 +0000 (+0800) Subject: discover: kexec harder X-Git-Tag: v1.0.0~665 X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=ee329cc09cfbeefac95efeda31bb9ef839dd1382 discover: kexec harder `kexec -e` will just call shutdown, which we've already tried, so it's likely to fail. Add a further fallback to force a kexec with -e -f options. Signed-off-by: Jeremy Kerr --- diff --git a/discover/boot.c b/discover/boot.c index d054d5d..29aefa9 100644 --- a/discover/boot.c +++ b/discover/boot.c @@ -94,6 +94,21 @@ static int kexec_reboot(int dry_run) if (result) pb_log("%s: failed: (%d)\n", __func__, result); + /* okay, kexec -e -f */ + if (result) { + p = argv; + *p++ = pb_system_apps.kexec; /* 1 */ + *p++ = "-e"; /* 2 */ + *p++ = "-f"; /* 3 */ + *p++ = NULL; /* 4 */ + + result = pb_run_cmd(argv, 1, 0); + } + + if (result) + pb_log("%s: failed: (%d)\n", __func__, result); + + return result; }