Skip to contentSkip to conversation

qemu-options: Mark -virtioconsole as deprecated

PATCH Superseded Thomas Huth 2 participants 2 messages May 3, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-options: Mark -virtioconsole as deprecated

The qemu-doc already states that this option is only maintained for backward compatibility and "-device virtconsole" should be used instead. So let's take the next step and mark this option officially as deprecated.

---
 qemu-doc.texi   | 5 +++++
 qemu-options.hx | 2 +-
 vl.c            | 2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)
qemu-doc.texi +5 -0
index 5813d27..e48ed05 100644
@@ -2931,6 +2931,11 @@ The @code{-localtime} option has been replaced by @code{-rtc base=localtime}.
 
 The @code{-startdate} option has been replaced by @code{-rtc base=@var{date}}.
 
+@subsection -virtioconsole (since 2.13.0)
+
+You can use @code{-device virtconsole} instead of @code{-virtioconsole}
+to configure a virtio-console.
+
 @section qemu-img command line arguments
 
 @subsection convert -s (since 2.0.0)
qemu-options.hx +1 -1
index c611766..7693d2c 100644
@@ -3676,7 +3676,7 @@ STEXI
 @findex -virtioconsole
 Set virtio console.
 
-This option is maintained for backward compatibility.
+This option is deprecated and only maintained for backward compatibility.
 
 Please use @code{-device virtconsole} for the new way of invocation.
 ETEXI
vl.c +2 -0
index 7487535..c409ff3 100644
@@ -3634,6 +3634,8 @@ int main(int argc, char **argv, char **envp)
                 }
                 break;
             case QEMU_OPTION_virtiocon:
+                warn_report("This option is deprecated, "
+                            "use '-device virtconsole' instead.");
                 add_device_config(DEV_VIRTCON, optarg);
                 default_virtcon = 0;
                 if (strncmp(optarg, "mon:", 4) == 0) {
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Thomas Huth

The qemu-doc already states that this option is only maintained for backward compatibility and "-device virtconsole" should be used instead. So let's take the next step and mark this option officially as deprecated.

---
 qemu-doc.texi   | 5 +++++
 qemu-options.hx | 2 +-
 vl.c            | 2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)
qemu-doc.texi +0 -0
index 5813d27..e48ed05 100644

qemu-doc.texi The @code{-localtime} option has been replaced by @code{-rtc base=localtime}. · line 2938

Quoted 8 lines
qemu-doc.texi +5 -0
@@ -2931,6 +2931,11 @@ The @code{-localtime} option has been replaced by @code{-rtc base=localtime}.
 
 The @code{-startdate} option has been replaced by @code{-rtc base=@var{date}}.
 
+@subsection -virtioconsole (since 2.13.0)
+
+You can use @code{-device virtconsole} instead of @code{-virtioconsole}
+to configure a virtio-console.
+

Or maybe "Option @option{-virtioconsole} has been replaced by @option{-device virtconsole}", to better match similar notes nearby. Your choice.

qemu-options.hx STEXI · line 3679

Quoted 13 lines
qemu-doc.texi +0 -0
 @section qemu-img command line arguments
 
 @subsection convert -s (since 2.0.0)
qemu-options.hx +1 -1
index c611766..7693d2c 100644
@@ -3676,7 +3676,7 @@ STEXI
 @findex -virtioconsole
 Set virtio console.
 
-This option is maintained for backward compatibility.
+This option is deprecated and only maintained for backward compatibility.

Suggest "This option is deprecated, use @option{-device virtconsole} instead".

vl.c int main(int argc, char **argv, char **envp) · line 3638

Quoted 13 lines
qemu-options.hx +0 -0
 Please use @code{-device virtconsole} for the new way of invocation.
 ETEXI
vl.c +2 -0
index 7487535..c409ff3 100644
@@ -3634,6 +3634,8 @@ int main(int argc, char **argv, char **envp)
                 }
                 break;
             case QEMU_OPTION_virtiocon:
+                warn_report("This option is deprecated, "
+                            "use '-device virtconsole' instead.");

Please drop the period.

vl.c int main(int argc, char **argv, char **envp) · line 3641

Quoted 3 lines
vl.c +0 -0
                 add_device_config(DEV_VIRTCON, optarg);
                 default_virtcon = 0;
                 if (strncmp(optarg, "mon:", 4) == 0) {

With that: