[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 01/20] nbd: produce a better error if neither
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 01/20] nbd: produce a better error if neither host nor port is passed |
Date: |
Mon, 17 Feb 2014 11:48:28 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 02/17/2014 06:43 AM, Paolo Bonzini wrote:
> Before:
> $ qemu-io-old
> qemu-io-old> open -r -o file.driver=nbd
> qemu-io-old: can't open device (null): Could not open image: Invalid
> argument
> $ ./qemu-io-old
> qemu-io-old> open -r -o file.driver=nbd,file.host=foo,file.path=bar
> path and host may not be used at the same time.
> qemu-io-old: can't open device (null): Could not open image: Invalid
> argument
>
> + if (qdict_haskey(options, "path") == qdict_haskey(options, "host")) {
> + if (qdict_haskey(options, "path")) {
> qerror_report(ERROR_CLASS_GENERIC_ERROR, "path and host may not "
> "be used at the same time.");
Pre-existing, but we tend to not use trailing '.' in error messages...
> - return -EINVAL;
> + } else {
> + qerror_report(ERROR_CLASS_GENERIC_ERROR, "one of path and host "
> + "must be specified.");
so you might as well fix the old one and not add a new instance of it.
But that's minor enough that I don't mind:
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 00/20] Improve bdrv_open error messages, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 01/20] nbd: produce a better error if neither host nor port is passed, Paolo Bonzini, 2014/02/17
- Re: [Qemu-devel] [PATCH v3 01/20] nbd: produce a better error if neither host nor port is passed,
Eric Blake <=
- [Qemu-devel] [PATCH v3 02/20] nbd: correctly propagate errors, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 03/20] nbd: inline tcp_socket_incoming_spec into sole caller, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 04/20] nbd: move socket wrappers to qemu-nbd, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 05/20] iscsi: fix indentation, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 06/20] iscsi: correctly propagate errors in iscsi_open, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 07/20] gluster: default scheme to gluster:// and host to localhost., Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 09/20] cow: correctly propagate errors, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 08/20] gluster: correctly propagate errors, Paolo Bonzini, 2014/02/17
- [Qemu-devel] [PATCH v3 10/20] curl: correctly propagate errors, Paolo Bonzini, 2014/02/17