Skip to content

Commit b979c93

Browse files
committed
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. Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 06e878b commit b979c93

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

docs/system/deprecated.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ library enabled as a cryptography provider.
146146
Neither the ``nettle`` library, or the built-in cryptography provider are
147147
supported on FIPS enabled hosts.
148148

149+
``-writeconfig`` (since 6.0)
150+
'''''''''''''''''''''''''''''
151+
152+
The ``-writeconfig`` option is not able to serialize the entire contents
153+
of the QEMU command line. It is thus considered a failed experiment
154+
and deprecated, with no current replacement.
155+
149156
QEMU Machine Protocol (QMP) commands
150157
------------------------------------
151158

qemu-options.hx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4335,13 +4335,8 @@ SRST
43354335
ERST
43364336
DEF("writeconfig", HAS_ARG, QEMU_OPTION_writeconfig,
43374337
"-writeconfig <file>\n"
4338-
" read/write config file\n", QEMU_ARCH_ALL)
4338+
" read/write config file (deprecated)\n", QEMU_ARCH_ALL)
43394339
SRST
4340-
``-writeconfig file``
4341-
Write device configuration to file. The file can be either filename
4342-
to save command line and device configuration into file or dash
4343-
``-``) character to print the output to stdout. This can be later
4344-
used as input file for ``-readconfig`` option.
43454340
ERST
43464341

43474342
DEF("no-user-config", 0, QEMU_OPTION_nouserconfig,

softmmu/vl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3356,6 +3356,7 @@ void qemu_init(int argc, char **argv, char **envp)
33563356
case QEMU_OPTION_writeconfig:
33573357
{
33583358
FILE *fp;
3359+
warn_report("-writeconfig is deprecated and will go away without a replacement");
33593360
if (strcmp(optarg, "-") == 0) {
33603361
fp = stdout;
33613362
} else {

0 commit comments

Comments
 (0)