This version syncs with the openSUSE version of the patch.  Interdiff
attached.

Be well,
--Robbie

Raymund Will (1):
  Add support for grub-emu to kexec Linux menu entries

 grub-core/Makefile.am        |   1 +
 grub-core/Makefile.core.def  |   2 +-
 grub-core/kern/emu/main.c    |   4 +
 grub-core/kern/emu/misc.c    |  18 +++-
 grub-core/loader/emu/linux.c | 180 +++++++++++++++++++++++++++++++++++
 include/grub/emu/exec.h      |   4 +-
 include/grub/emu/hostfile.h  |   3 +-
 include/grub/emu/misc.h      |   3 +
 8 files changed, 211 insertions(+), 4 deletions(-)
 create mode 100644 grub-core/loader/emu/linux.c

Interdiff against v2:
diff --git a/grub-core/loader/emu/linux.c b/grub-core/loader/emu/linux.c
index 020cf56cd1..b5ea48a677 100644
--- a/grub-core/loader/emu/linux.c
+++ b/grub-core/loader/emu/linux.c
@@ -38,7 +38,7 @@ grub_linux_boot (void)
 {
   grub_err_t rc = GRUB_ERR_NONE;
   char *initrd_param;
-  const char *kexec[] = { "kexec", "-l", kernel_path, boot_cmdline, NULL, NULL 
};
+  const char *kexec[] = { "kexec", "-la", kernel_path, boot_cmdline, NULL, 
NULL };
   const char *systemctl[] = { "systemctl", "kexec", NULL };
   int kexecute = grub_util_get_kexecute ();
 
@@ -53,7 +53,7 @@ grub_linux_boot (void)
       initrd_param = grub_xasprintf ("%s", "");
     }
 
-  grub_dprintf ("linux", "%serforming 'kexec -l %s %s %s'\n",
+  grub_dprintf ("linux", "%serforming 'kexec -la %s %s %s'\n",
                 (kexecute) ? "P" : "Not p",
                 kernel_path, initrd_param, boot_cmdline);
 
@@ -76,10 +76,8 @@ grub_linux_boot (void)
                (kexecute==1) ? "do-or-die" : "just-in-case");
   rc = grub_util_exec (systemctl);
 
-  if (rc == GRUB_ERR_NONE)
-    return rc;
-
-  grub_error (rc, N_("Error trying to perform 'systemctl kexec'"));
+  if (kexecute == 1)
+    grub_error (rc, N_("Error trying to perform 'systemctl kexec'"));
 
   /* need to check read-only root before resetting hard!? */
   grub_dprintf ("linux", "Performing 'kexec -e -x'");
-- 
2.35.1


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to