From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFTF6-00059Q-1Y for qemu-devel@nongnu.org; Mon, 17 Feb 2014 13:48:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFTF0-0004qH-Uk for qemu-devel@nongnu.org; Mon, 17 Feb 2014 13:48:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFTF0-0004pv-Ji for qemu-devel@nongnu.org; Mon, 17 Feb 2014 13:48:30 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1HImT1d007422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Feb 2014 13:48:29 -0500 Message-ID: <5302597C.2010607@redhat.com> Date: Mon, 17 Feb 2014 11:48:28 -0700 From: Eric Blake MIME-Version: 1.0 References: <1392644647-9897-1-git-send-email-pbonzini@redhat.com> <1392644647-9897-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1392644647-9897-2-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PpP2N2gi6d8GsatCt2LAfT2Q70KgARXxE" Subject: Re: [Qemu-devel] [PATCH v3 01/20] nbd: produce a better error if neither host nor port is passed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com, famz@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PpP2N2gi6d8GsatCt2LAfT2Q70KgARXxE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/17/2014 06:43 AM, Paolo Bonzini wrote: > Before: > $ qemu-io-old > qemu-io-old> open -r -o file.driver=3Dnbd > qemu-io-old: can't open device (null): Could not open image: Invali= d argument > $ ./qemu-io-old > qemu-io-old> open -r -o file.driver=3Dnbd,file.host=3Dfoo,file.path= =3Dbar > path and host may not be used at the same time. > qemu-io-old: can't open device (null): Could not open image: Invali= d argument >=20 > + if (qdict_haskey(options, "path") =3D=3D qdict_haskey(options, "ho= st")) { > + if (qdict_haskey(options, "path")) { > qerror_report(ERROR_CLASS_GENERIC_ERROR, "path and host ma= y 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --PpP2N2gi6d8GsatCt2LAfT2Q70KgARXxE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTAll8AAoJEKeha0olJ0Nqg90H/35h8DyC1/i19s6MYLfxBRJV ej4iTNpWTJJUw54u4BZrNLiUguqS3YCBOD6vnNzGOQt570hAabb6GHL7Z4DVpBKC Q9lQOat/ti06FuuITvTWfNWJG/sStlQUm+JqbnYAc01l/8PweR2DvauuhMHWejNi cfihetsLDJ2TmdQQHSgU0MfqNXEHPk/la7eihcoooyT5vxXbRbkmkN8Q2o+bd2Z1 SGt3MWao1rJ96M0HaELNPGZS4EEPzI3X5L3l/KcQ9sIQbEJpyEj3BtGoOfdR05JD m23vhoUAN+sHfLnG3YEOnD+4MSA6VaSEKV3PIbbFDLFyfOKnfPOdavqo/IKLcSY= =8dFS -----END PGP SIGNATURE----- --PpP2N2gi6d8GsatCt2LAfT2Q70KgARXxE--