diff options
author | Kevin Wolf <kwolf@redhat.com> | 2021-02-17 12:56:45 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-03-19 10:17:14 +0100 |
commit | 99b1e64688893d0b772074b5a2972a0bad85c19f (patch) | |
tree | 99c8c884708cf8766dba48cfd8b9a96aaf42570f /tools | |
parent | ffd58ef88c73700113e0808e8222ef4d22224f33 (diff) | |
download | qemu-99b1e64688893d0b772074b5a2972a0bad85c19f.zip qemu-99b1e64688893d0b772074b5a2972a0bad85c19f.tar.gz qemu-99b1e64688893d0b772074b5a2972a0bad85c19f.tar.bz2 |
qemu-img: Use user_creatable_process_cmdline() for --object
This switches qemu-img from a QemuOpts-based parser for --object to
user_creatable_process_cmdline() which uses a keyval parser and enforces
the QAPI schema.
Apart from being a cleanup, this makes non-scalar properties accessible.
As a side effect, fix wrong exit codes in the object parsing error path
of 'qemu-img compare'. This was broken in commit 334c43e2c3 because
&error_fatal exits with an exit code of 1, while it should have been 2.
Document that exit code 0 is also returned when just requested help was
printed instead of comparing images. This is preexisting behaviour that
isn't changed by this patch, though another instance of it is added with
'--object help'.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions