On 12/17/2015 09:49 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster <[email protected]> > --- > contrib/ivshmem-server/main.c | 4 +--- > qdev-monitor.c | 3 +-- > qemu-nbd.c | 3 +-- > 3 files changed, 3 insertions(+), 7 deletions(-) > > diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c > index 54ff001..00508b5 100644 > --- a/contrib/ivshmem-server/main.c > +++ b/contrib/ivshmem-server/main.c > @@ -106,9 +106,7 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int > argc, char *argv[]) > case 'l': /* shm_size */ > parse_option_size("shm_size", optarg, &args->shm_size, &errp);
Idea for a followup patch: The name 'errp' is most often associated with
type 'Error **'; but here it is 'Error *', which is confusing.
Other offenders in hmp.c, hw/core/nmi.c, include/qemu/sockets.h, and
tests/test-string-output-visitor.c.
> if (errp) {
> - fprintf(stderr, "cannot parse shm size: %s\n",
> - error_get_pretty(errp));
> - error_free(errp);
> + error_report_err(errp);
This loses the "cannot parse shm size: " prefix; but I don't think that
hurts. Could use a mention in the commit message, though.
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
