aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Tokunaga <ktokunaga.mail@gmail.com>2025-04-28 15:39:04 +0900
committerPaolo Bonzini <pbonzini@redhat.com>2025-05-06 16:02:04 +0200
commit1a8964424036cdfe1bd11180953d4e95123990f5 (patch)
tree316932f8dd73bc334033474877a0eb10cc2be898
parent0f46bf659f015d4860c7212b4a6f0656b312d4f4 (diff)
downloadqemu-1a8964424036cdfe1bd11180953d4e95123990f5.zip
qemu-1a8964424036cdfe1bd11180953d4e95123990f5.tar.gz
qemu-1a8964424036cdfe1bd11180953d4e95123990f5.tar.bz2
Disable options unsupported on Emscripten
Daemonizing and run-with aren't supported on Emscripten so disable these flags. Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/r/79c5e591b634762703f3eef6427a192d145799e4.1745820062.git.ktokunaga.mail@gmail.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--qemu-options.hx4
-rw-r--r--system/vl.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index dc694a9..aab53bc 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -4862,7 +4862,7 @@ SRST
Start right away with a saved state (``loadvm`` in monitor)
ERST
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(EMSCRIPTEN)
DEF("daemonize", 0, QEMU_OPTION_daemonize, \
"-daemonize daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
#endif
@@ -5249,7 +5249,7 @@ HXCOMM Internal use
DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL)
DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)
-#ifdef CONFIG_POSIX
+#if defined(CONFIG_POSIX) && !defined(EMSCRIPTEN)
DEF("run-with", HAS_ARG, QEMU_OPTION_run_with,
"-run-with [async-teardown=on|off][,chroot=dir][user=username|uid:gid]\n"
" Set miscellaneous QEMU process lifecycle options:\n"
diff --git a/system/vl.c b/system/vl.c
index 520956f..b69d5bb 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -767,7 +767,7 @@ static QemuOptsList qemu_smp_opts = {
},
};
-#if defined(CONFIG_POSIX)
+#if defined(CONFIG_POSIX) && !defined(EMSCRIPTEN)
static QemuOptsList qemu_run_with_opts = {
.name = "run-with",
.head = QTAILQ_HEAD_INITIALIZER(qemu_run_with_opts.head),
@@ -3678,7 +3678,7 @@ void qemu_init(int argc, char **argv)
case QEMU_OPTION_nouserconfig:
/* Nothing to be parsed here. Especially, do not error out below. */
break;
-#if defined(CONFIG_POSIX)
+#if defined(CONFIG_POSIX) && !defined(EMSCRIPTEN)
case QEMU_OPTION_daemonize:
os_set_daemonize(true);
break;