Commit 562b2fe797 for qemu.org
commit 562b2fe797cf321bd513d29ce955608a4d743847
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Wed Sep 2 11:47:53 2026 +0100
system: improve -mon deprecation warning
Expand the text a bit to make the new syntax more explicit and point
users to the man page for further info.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20260902104753.1756783-1-berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
diff --git a/system/vl.c b/system/vl.c
index 1b22a358d2..9bd7664b85 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -3238,8 +3238,13 @@ void qemu_init(int argc, char **argv)
default_monitor = 0;
break;
case QEMU_OPTION_mon:
- warn_report_once("'-mon' is deprecated, use '-object' with "
- "'monitor-hmp' or 'monitor-qmp' types instead");
+ warn_report_once(
+ "'-mon' is deprecated. Switch to either "
+ "'-object monitor-hmp,id=ID,chardev=CHR-ID' or "
+ "'-object monitor-qmp,id=ID,chardev=CHR-ID' instead. "
+ "See '-object' docs in the QEMU manual for further "
+ "configuration guidance: "
+ "https://www.qemu.org/docs/master/system/invocation.html");
if (!qemu_opts_parse_noisily(qemu_find_opts("mon"), optarg,
true)) {
exit(1);