vl: deprecate -writeconfig
PATCH v2 1/1 vl: deprecate -writeconfig
The functionality of -writeconfig is limited and the code does not even try to detect cases where it prints incorrect syntax (for example if values have a quote in them, since qemu_config_parse does not support any kind of escaping) so remove it.
---
v1->v2: drop option from manual, mention that there is no replacement --- docs/system/deprecated.rst | 7 +++++++ qemu-options.hx | 7 +------ softmmu/vl.c | 1 + 3 files changed, 9 insertions(+), 6 deletions(-)
docs/system/deprecated.rst +7 -0
@@ -146,6 +146,13 @@ library enabled as a cryptography provider. Neither the ``nettle`` library, or the built-in cryptography provider are supported on FIPS enabled hosts. +``-writeconfig`` (since 6.0) +''''''''''''''''''''''''''''' + +The ``-writeconfig`` option is not able to serialize the entire contents +of the QEMU command line. It is thus considered a failed experiment +and deprecated, with no current replacement. + QEMU Machine Protocol (QMP) commands ------------------------------------
qemu-options.hx +1 -6
@@ -4335,13 +4335,8 @@ SRST ERST DEF("writeconfig", HAS_ARG, QEMU_OPTION_writeconfig, "-writeconfig <file>\n" - " read/write config file\n", QEMU_ARCH_ALL) + " read/write config file (deprecated)\n", QEMU_ARCH_ALL) SRST -``-writeconfig file`` - Write device configuration to file. The file can be either filename - to save command line and device configuration into file or dash - ``-``) character to print the output to stdout. This can be later - used as input file for ``-readconfig`` option. ERST DEF("no-user-config", 0, QEMU_OPTION_nouserconfig,
softmmu/vl.c +1 -0
@@ -3356,6 +3356,7 @@ void qemu_init(int argc, char **argv, char **envp)case QEMU_OPTION_writeconfig: {FILE *fp; +warn_report ("-writeconfig is deprecated. It will go away in QEMU 6.2 with no replacement" );if (strcmp (optarg,"-" ) ==0 ) { fp = stdout; }else {
Signature · 1 line
2.29.2
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PATCH v2] vl: deprecate -writeconfig
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
00160fe vl: deprecate -writeconfig
=== OUTPUT BEGIN ===
ERROR: line over 90 characters
#66: FILE: softmmu/vl.c:3359:
+ warn_report("-writeconfig is deprecated. It will go away in QEMU 6.2 with no replacement");
total: 1 errors, 0 warnings, 34 lines checked
Commit 00160fea8f7f (vl: deprecate -writeconfig) has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Quoted 20 lines · Paolo Bonzini
The functionality of -writeconfig is limited and the code does not even try to detect cases where it prints incorrect syntax (for example if values have a quote in them, since
qemu_config_parsedoes not support any kind of escaping) so remove it.Signed-off-by Paolo Bonzini <[email protected]>---
v1->v2: drop option from manual, mention that there is no replacement --- docs/system/deprecated.rst | 7 +++++++ qemu-options.hx | 7 +------ softmmu/vl.c | 1 + 3 files changed, 9 insertions(+), 6 deletions(-)softmmu/vl.c +0
-0
softmmu/vl.c void qemu_init(int argc, char **argv, char **envp) · line 3359
Quoted 4 lines
softmmu/vl.c +1
-0@@ -3356,6 +3356,7 @@ void qemu_init(int argc, char **argv, char **envp)case QEMU_OPTION_writeconfig: {FILE *fp; +warn_report ("-writeconfig is deprecated. It will go away in QEMU 6.2 with no replacement" );
FWIW, we've rarely kept exactly to our 2 cycle plan. In practice it has become more of a minimum bar, rather than an exact deadline. If you want to promise death in 6.2 though I'll defer to your judgement :=)
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 5 lines · Daniel P. Berrangé
FWIW, we've rarely kept exactly to our 2 cycle plan. In practice it has become more of a minimum bar, rather than an exact deadline. If you want to promise death in 6.2 though I'll defer to your judgement :=)
Reviewed-by Daniel P. Berrangé<[email protected]>
Well, I have patches waiting for the removal and sitting over them for a year is already enough. :)
Paolo
Quoted 8 lines · Paolo Bonzini
Quoted 4 lines · Daniel P. Berrangé
FWIW, we've rarely kept exactly to our 2 cycle plan. In practice it has become more of a minimum bar, rather than an exact deadline. If you want to promise death in 6.2 though I'll defer to your judgement :=)
Reviewed-by Daniel P. Berrangé<[email protected]>Well, I have patches waiting for the removal and sitting over them for a year is already enough. :)
I don't see a need to bake the end of the grace period into the deprecation message. We don't do that elsewhere, either.
Quoted 8 lines · Markus Armbruster
Quoted 6 lines · Paolo Bonzini
Quoted 4 lines · Daniel P. Berrangé
FWIW, we've rarely kept exactly to our 2 cycle plan. In practice it has become more of a minimum bar, rather than an exact deadline. If you want to promise death in 6.2 though I'll defer to your judgement :=)
Reviewed-by Daniel P. Berrangé<[email protected]>
Quoted 5 lines
Quoted 2 lines
Well, I have patches waiting for the removal and sitting over them for a year is already enough. :)
I don't see a need to bake the end of the grace period into the deprecation message. We don't do that elsewhere, either.
Ok, I'll change it to just "-writeconfig is deprecated and will go away without a replacement".
Paolo