* [PATCH v3] vl: deprecate -writeconfig
@ 2021-03-02 18:00 Paolo Bonzini
2021-03-02 18:39 ` no-reply
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Paolo Bonzini @ 2021-03-02 18:00 UTC (permalink / raw)
To: qemu-devel; +Cc: armbru
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.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/system/deprecated.rst | 7 +++++++
qemu-options.hx | 7 +------
softmmu/vl.c | 1 +
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 2fcac7861e..561c916da2 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -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
------------------------------------
diff --git a/qemu-options.hx b/qemu-options.hx
index 34be5a7a2d..252db9357c 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -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,
diff --git a/softmmu/vl.c b/softmmu/vl.c
index b219ce1f35..10bd8a10a3 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3356,6 +3356,7 @@ void qemu_init(int argc, char **argv, char **envp)
case QEMU_OPTION_writeconfig:
{
FILE *fp;
+ warn_report("-writeconfig is deprecated and will go away without a replacement");
if (strcmp(optarg, "-") == 0) {
fp = stdout;
} else {
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vl: deprecate -writeconfig
2021-03-02 18:00 [PATCH v3] vl: deprecate -writeconfig Paolo Bonzini
@ 2021-03-02 18:39 ` no-reply
2021-03-02 18:49 ` Thomas Huth
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: no-reply @ 2021-03-02 18:39 UTC (permalink / raw)
To: pbonzini; +Cc: qemu-devel, armbru
Patchew URL: https://patchew.org/QEMU/20210302180023.54555-1-pbonzini@redhat.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20210302180023.54555-1-pbonzini@redhat.com
Subject: [PATCH v3] 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
* [new tag] patchew/20210302180023.54555-1-pbonzini@redhat.com -> patchew/20210302180023.54555-1-pbonzini@redhat.com
Switched to a new branch 'test'
25b4cd1 vl: deprecate -writeconfig
=== OUTPUT BEGIN ===
ERROR: line over 90 characters
#66: FILE: softmmu/vl.c:3359:
+ warn_report("-writeconfig is deprecated and will go away without a replacement");
total: 1 errors, 0 warnings, 34 lines checked
Commit 25b4cd1060d2 (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/20210302180023.54555-1-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vl: deprecate -writeconfig
2021-03-02 18:00 [PATCH v3] vl: deprecate -writeconfig Paolo Bonzini
2021-03-02 18:39 ` no-reply
@ 2021-03-02 18:49 ` Thomas Huth
2021-03-03 6:29 ` Markus Armbruster
2021-03-03 7:19 ` Gerd Hoffmann
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2021-03-02 18:49 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: armbru
On 02/03/2021 19.00, Paolo Bonzini wrote:
> 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.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> docs/system/deprecated.rst | 7 +++++++
> qemu-options.hx | 7 +------
> softmmu/vl.c | 1 +
> 3 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
> index 2fcac7861e..561c916da2 100644
> --- a/docs/system/deprecated.rst
> +++ b/docs/system/deprecated.rst
> @@ -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
> ------------------------------------
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 34be5a7a2d..252db9357c 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -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,
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index b219ce1f35..10bd8a10a3 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3356,6 +3356,7 @@ void qemu_init(int argc, char **argv, char **envp)
> case QEMU_OPTION_writeconfig:
> {
> FILE *fp;
> + warn_report("-writeconfig is deprecated and will go away without a replacement");
> if (strcmp(optarg, "-") == 0) {
> fp = stdout;
> } else {
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vl: deprecate -writeconfig
2021-03-02 18:00 [PATCH v3] vl: deprecate -writeconfig Paolo Bonzini
2021-03-02 18:39 ` no-reply
2021-03-02 18:49 ` Thomas Huth
@ 2021-03-03 6:29 ` Markus Armbruster
2021-03-03 7:19 ` Gerd Hoffmann
3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2021-03-03 6:29 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> 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.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] vl: deprecate -writeconfig
2021-03-02 18:00 [PATCH v3] vl: deprecate -writeconfig Paolo Bonzini
` (2 preceding siblings ...)
2021-03-03 6:29 ` Markus Armbruster
@ 2021-03-03 7:19 ` Gerd Hoffmann
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2021-03-03 7:19 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, armbru
On Tue, Mar 02, 2021 at 07:00:23PM +0100, Paolo Bonzini wrote:
> 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.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-03 7:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 18:00 [PATCH v3] vl: deprecate -writeconfig Paolo Bonzini
2021-03-02 18:39 ` no-reply
2021-03-02 18:49 ` Thomas Huth
2021-03-03 6:29 ` Markus Armbruster
2021-03-03 7:19 ` Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.