From 033dc5f08e52fc0d082750320559fe1990a5316c Mon Sep 17 00:00:00 2001 From: BiatuAutMiahn Date: Thu, 19 Dec 2024 21:47:40 -0500 Subject: [PATCH] Missed vl.c --- softmmu/vl.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index badf207da0c..d6b8c980d1d 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2782,8 +2782,18 @@ void qemu_init(int argc, char **argv) "none", }[g_config.sys.avpack]; - fake_argv[fake_argc++] = g_strdup_printf("xbox%s%s%s,avpack=%s", + bool eject_after_boot = false; + for (int i = 1; i < argc; i++) { + if (argv[i] && strcmp(argv[i], "-eject_after_boot")==0) { + argv[i] = NULL; + eject_after_boot = true; + break; + } + } + + fake_argv[fake_argc++] = g_strdup_printf("xbox%s%s%s%s,avpack=%s", (bootrom_arg != NULL) ? bootrom_arg : "", + eject_after_boot ? ",eject-after-boot=on" : "", g_config.general.skip_boot_anim ? ",short-animation=on" : "", ",kernel-irqchip=off", avpack_str