@@ -105,7 +105,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",
@@ -597,6 +597,8 @@ struct boot_task *boot(void *ctx, struct discover_boot_option *opt,
boot_task->args = NULL;
}
+ boot_task->kexec_method = config->kexec_method;
+
if (cmd && cmd->console && !config->manual_console)
boot_task->boot_console = talloc_strdup(boot_task, cmd->console);
else
@@ -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 | 4 +++- discover/boot.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-)