aboutsummaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-03-19 11:27:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-03-19 11:27:40 +0000
commit92566947b3ac5ca75f91a34acb188219c455fc71 (patch)
treefb29699e353fe9b93dbbaf4cc1c2b2bc2a5843de /qemu-io.c
parentcf6b56d4f2107259f52413f979a1d474dad0c1e1 (diff)
parent009ff89328b1da3ea8ba316bf2be2125bc9937c5 (diff)
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches and object-add QAPIfication - QAPIfy object-add and --object - stream: Fail gracefully if permission is denied - storage-daemon: Fix crash on quit when job is still running - curl: Fix use after free - char: Deprecate backend aliases, fix QMP query-chardev-backends - Fix image creation option defaults that exist in both the format and the protocol layer (e.g. 'cluster_size' in qcow2 and rbd; the qcow2 default was incorrectly applied to the rbd layer) # gpg: Signature made Fri 19 Mar 2021 09:18:22 GMT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (42 commits) vl: allow passing JSON to -object qom: move user_creatable_add_opts logic to vl.c and QAPIfy it tests: convert check-qom-proplist to keyval qom: Support JSON in HMP object_add and tools --object char: Simplify chardev_name_foreach() char: Deprecate backend aliases 'tty' and 'parport' char: Skip CLI aliases in query-chardev-backends qom: Add user_creatable_parse_str() hmp: QAPIfy object_add qemu-img: Use user_creatable_process_cmdline() for --object qom: Add user_creatable_add_from_str() qemu-nbd: Use user_creatable_process_cmdline() for --object qemu-io: Use user_creatable_process_cmdline() for --object qom: Factor out user_creatable_process_cmdline() qom: Remove user_creatable_add_dict() qemu-storage-daemon: Implement --object with qmp_object_add() qom: Make "object" QemuOptsList optional qapi/qom: QAPIfy object-add qapi/qom: Add ObjectOptions for x-remote-object qapi/qom: Add ObjectOptions for input-* ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/qemu-io.c b/qemu-io.c
index ac88d8bd40..bf902302e9 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -477,23 +477,6 @@ enum {
OPTION_IMAGE_OPTS = 257,
};
-static QemuOptsList qemu_object_opts = {
- .name = "object",
- .implied_opt_name = "qom-type",
- .head = QTAILQ_HEAD_INITIALIZER(qemu_object_opts.head),
- .desc = {
- { }
- },
-};
-
-static bool qemu_io_object_print_help(const char *type, QemuOpts *opts)
-{
- if (user_creatable_print_help(type, opts)) {
- exit(0);
- }
- return true;
-}
-
static QemuOptsList file_opts = {
.name = "file",
.implied_opt_name = "file",
@@ -550,7 +533,6 @@ int main(int argc, char **argv)
qcrypto_init(&error_fatal);
module_call_init(MODULE_INIT_QOM);
- qemu_add_opts(&qemu_object_opts);
qemu_add_opts(&qemu_trace_opts);
bdrv_init();
@@ -612,14 +594,9 @@ int main(int argc, char **argv)
case 'U':
force_share = true;
break;
- case OPTION_OBJECT: {
- QemuOpts *qopts;
- qopts = qemu_opts_parse_noisily(&qemu_object_opts,
- optarg, true);
- if (!qopts) {
- exit(1);
- }
- } break;
+ case OPTION_OBJECT:
+ user_creatable_process_cmdline(optarg);
+ break;
case OPTION_IMAGE_OPTS:
imageOpts = true;
break;
@@ -644,10 +621,6 @@ int main(int argc, char **argv)
exit(1);
}
- qemu_opts_foreach(&qemu_object_opts,
- user_creatable_add_opts_foreach,
- qemu_io_object_print_help, &error_fatal);
-
if (!trace_init_backends()) {
exit(1);
}