Skip to contentSkip to conversation

system: improve -mon deprecation warning

PATCH In review Daniel P. Berrangé 3 participants 3 messages Sep 2 – Sep 3

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
 system/vl.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
system/vl.c +7 -2
index eded498fa7..d1d9209038 100644
@@ -3239,8 +3239,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);
Signature · 1 line
2.55.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 21 lines · Daniel P. Berrangé

Expand the text a bit to make the new syntax more explicit and point users to the man page for further info.

---
 system/vl.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
system/vl.c +1 -2
index eded498fa7..d1d9209038 100644
@@ -3239,8 +3239,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(

system/vl.c void qemu_init(int argc, char **argv)

Quoted 10 lines
system/vl.c +6 -1
+                    "'-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);
--

thanks
-- PMM