]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-option: improve qemu_opts_print_help() output
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 14 Aug 2018 15:08:04 +0000 (17:08 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 5 Oct 2018 12:14:22 +0000 (16:14 +0400)
commit9cbef9d68ee1d8d04342e40d1126ab7d27f93554
treedcd345dd4b4584e99cb1e1a98bbd090e36ec69b4
parente05979d0d7362d25275adcc73ad082bf66b9b018
qemu-option: improve qemu_opts_print_help() output

Modify qemu_opts_print_help():
- to print expected argument type
- skip description if not available
- sort lines
- prefix with the list name (like qdev, to avoid confusion)
- drop 16-chars alignment, use a '-' as seperator for option name and
  description

For ex, "-spice help" output is changed from:

port             No description available
tls-port         No description available
addr             No description available
[...]
gl               No description available
rendernode       No description available

to:

spice.addr=str
spice.agent-mouse=bool (on/off)
spice.disable-agent-file-xfer=bool (on/off)
[...]
spice.x509-key-password=str
spice.zlib-glz-wan-compression=str

"qemu-img create -f qcow2 -o help", changed from:

size             Virtual disk size
compat           Compatibility level (0.10 or 1.1)
backing_file     File name of a base image
[...]
lazy_refcounts   Postpone refcount updates
refcount_bits    Width of a reference count entry in bits

to:

backing_file=str - File name of a base image
backing_fmt=str - Image format of the base image
cluster_size=size - qcow2 cluster size
[...]
refcount_bits=num - Width of a reference count entry in bits
size=size - Virtual disk size

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
util/qemu-option.c