If we're booting from a default option, we don't have a boot command.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
initrd = NULL;
args = NULL;
initrd = NULL;
args = NULL;
- if (cmd->boot_image_file) {
+ if (cmd && cmd->boot_image_file) {
image = pb_url_parse(opt, cmd->boot_image_file);
} else if (opt && opt->boot_image) {
image = opt->boot_image->url;
image = pb_url_parse(opt, cmd->boot_image_file);
} else if (opt && opt->boot_image) {
image = opt->boot_image->url;
- if (cmd->initrd_file) {
+ if (cmd && cmd->initrd_file) {
initrd = pb_url_parse(opt, cmd->initrd_file);
} else if (opt && opt->initrd) {
initrd = opt->initrd->url;
}
initrd = pb_url_parse(opt, cmd->initrd_file);
} else if (opt && opt->initrd) {
initrd = opt->initrd->url;
}
+ if (cmd && cmd->boot_args) {
args = talloc_strdup(ctx, cmd->boot_args);
} else if (opt && opt->option->boot_args) {
args = talloc_strdup(ctx, opt->option->boot_args);
args = talloc_strdup(ctx, cmd->boot_args);
} else if (opt && opt->option->boot_args) {
args = talloc_strdup(ctx, opt->option->boot_args);