]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-nbd.c
error: Use error_report_err() instead of ad hoc prints
authorMarkus Armbruster <armbru@redhat.com>
Fri, 18 Dec 2015 15:35:07 +0000 (16:35 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 13 Jan 2016 14:16:16 +0000 (15:16 +0100)
commit782886719822c956e800dfb9c0665e2b301cb1fb
tree754470c7cfdebee6d0a0a10eba6a9c10c4bf1062
parent193227f9e565803b1167fa01301bdf9f6d294d6a
error: Use error_report_err() instead of ad hoc prints

Unlike ad hoc prints, error_report_err() uses the error whole instead
of just its message obtained with error_get_pretty().  This avoids
suppressing its hint (see commit 50b7b00).  Example:

    $ bld/ivshmem-server -l 42@
    Parameter 'shm_size' expects a size
    You may use k, M, G or T suffixes for kilobytes, megabytes, gigabytes and terabytes.

The last line is new with this patch.

While there, drop a "cannot parse shm size: " message prefix; it's
redundant, because the error message proper is always of the form
"Parameter 'shm_size' expects ...".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-5-git-send-email-armbru@redhat.com>
contrib/ivshmem-server/main.c
qdev-monitor.c
qemu-nbd.c