From e960a7ee46e29556b80996bed396b79d7077f82f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 14 Apr 2022 10:57:21 -0400 Subject: remove -writeconfig Like -set and -readconfig, it would not really be too hard to extend -writeconfig to parsing mechanisms other than QemuOpts. However, the uses of -writeconfig are substantially more limited, as it is generally easier to write the configuration by hand in the first place. In addition, -writeconfig 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. Just remove it. Signed-off-by: Paolo Bonzini Message-Id: <20220414145721.326866-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'softmmu') diff --git a/softmmu/vl.c b/softmmu/vl.c index 06a0e34..c291957 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3551,26 +3551,6 @@ void qemu_init(int argc, char **argv, char **envp) display_remote++; break; #endif - 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 { - fp = fopen(optarg, "w"); - if (fp == NULL) { - error_report("open %s: %s", optarg, - strerror(errno)); - exit(1); - } - } - qemu_config_write(fp); - if (fp != stdout) { - fclose(fp); - } - break; - } case QEMU_OPTION_qtest: qtest_chrdev = optarg; break; -- cgit v1.1