They are also moved inside -machine. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- qemu-config.c | 8 ++++++++ vl.c | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/qemu-config.c b/qemu-config.c index 6e97ff6..e901826 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -568,6 +568,14 @@ static QemuOptsList qemu_machine_opts = { .type = QEMU_OPT_BOOL, .help = "start machine immediately", }, { + .name = "no_reboot", + .type = QEMU_OPT_BOOL, + .help = "exit instead of rebooting", + }, { + .name = "no_shutdown", + .type = QEMU_OPT_BOOL, + .help = "stop before shutdown", + }, { .name = "bios", .type = QEMU_OPT_STRING, .help = "BIOS/firmware file", diff --git a/vl.c b/vl.c index aa324ed..b2a69a5 100644 --- a/vl.c +++ b/vl.c @@ -2990,10 +2990,10 @@ int main(int argc, char **argv, char **envp) } break; case QEMU_OPTION_no_reboot: - no_reboot = 1; + qemu_opts_set(qemu_find_opts("machine"), 0, "no_reboot", "on"); break; case QEMU_OPTION_no_shutdown: - no_shutdown = 1; + qemu_opts_set(qemu_find_opts("machine"), 0, "no_shutdown", "on"); break; case QEMU_OPTION_show_cursor: cursor_hide = 0; @@ -3309,6 +3309,8 @@ int main(int argc, char **argv, char **envp) kernel_filename = initrd_filename = kernel_cmdline = NULL; ram_size = DEFAULT_RAM_SIZE * 1024 * 1024; if (machine_opts) { + no_reboot = qemu_opt_get_bool(machine_opts, "no_reboot", false); + no_shutdown = qemu_opt_get_bool(machine_opts, "no_shutdown", false); autostart = qemu_opt_get_bool(machine_opts, "autostart", true); bios_name = qemu_opt_get(machine_opts, "bios"); ram_size = qemu_opt_get_size(machine_opts, "ram_size", ram_size); -- 1.7.7.6