@@ -72,7 +72,7 @@ static int kexec_load(struct boot_task *boot_task)
p = argv;
*p++ = pb_system_apps.kexec; /* 1 */
- *p++ = "-l"; /* 2 */
+ *p++ = (boot_task->kexec_method) ? "-s" : "-l"; /* 2 */
if (local_initrd) {
s_initrd = talloc_asprintf(boot_task, "--initrd=%s",
@@ -574,10 +574,12 @@ struct boot_task *boot(void *ctx, struct discover_boot_option *opt,
boot_task->args = NULL;
}
+ config = config_get();
+ boot_task->kexec_method = config->kexec_method;
+
if (cmd && cmd->tty)
boot_task->boot_tty = talloc_strdup(boot_task, cmd->tty);
else {
- config = config_get();
boot_task->boot_tty = config ? config->boot_tty : NULL;
}
@@ -33,6 +33,7 @@ struct boot_task {
bool cancelled;
bool verify_signature;
bool decrypt_files;
+ bool kexec_method;
struct load_url_result *image_signature;
struct load_url_result *initrd_signature;
struct load_url_result *dtb_signature;
Adds a kexec_method boolean to the boot_task struct to control which syscall is used for kexec loading. If set to true, the parameter for kexec_file_load (-s) is passed to kexec-{tools,lite} instead of the default parameter for kexec_load (-l). Signed-off-by: Eric Richter <erichte@linux.vnet.ibm.com> --- discover/boot.c | 6 ++++-- discover/boot.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)