From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR0Ro-0003Yc-T7 for qemu-devel@nongnu.org; Wed, 03 Feb 2016 11:38:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aR0Rn-0000Hh-TU for qemu-devel@nongnu.org; Wed, 03 Feb 2016 11:38:28 -0500 References: <1454517196-4560-1-git-send-email-mreitz@redhat.com> <1454517196-4560-2-git-send-email-mreitz@redhat.com> From: Eric Blake Message-ID: <56B22CFC.4060907@redhat.com> Date: Wed, 3 Feb 2016 09:38:20 -0700 MIME-Version: 1.0 In-Reply-To: <1454517196-4560-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5E6Qh9CR1mLTKOKOpwu21tJ8XNBiNdQdp" Subject: Re: [Qemu-devel] [PATCH 1/2] block/nbd: Reject port parameter without host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org, Markus Armbruster This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5E6Qh9CR1mLTKOKOpwu21tJ8XNBiNdQdp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/03/2016 09:33 AM, Max Reitz wrote: > This is better than the generic block layer finding out later that the > port parameter has not been used. >=20 > Signed-off-by: Max Reitz > --- > block/nbd.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/block/nbd.c b/block/nbd.c > index 1a90bc7..063c403 100644 > --- a/block/nbd.c > +++ b/block/nbd.c > @@ -201,6 +201,10 @@ static SocketAddress *nbd_config(BDRVNBDState *s, = QDict *options, char **export, > } > return NULL; > } > + if (qdict_haskey(options, "port") && !qdict_haskey(options, "host"= )) { > + error_setg(errp, "port may not be used without host."); No trailing '.' With that fixed, Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --5E6Qh9CR1mLTKOKOpwu21tJ8XNBiNdQdp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWsiz8AAoJEKeha0olJ0NqcDYH/3RF8e0u4MkF6FmqKW7i41qc sOOjo7aePy2WOu0yJQaMkZG3xis9pJO/cY9IMcidA2KpKHWVbOhZHEFxWbimJKNn eSsgeaJjZuU274x/VIyFW9hLUmmxtgLXk0Mkl0pW3ygu0oQXWPIzTJYskcG0WWSP VWkMKZa3iE2oKMfIRGuoIzCZ92yB3dgzOzBF7VTrH4JKCeTk397H7xNYWWykk4vd akgFWt3ENVr78yRWQE8JBZs4siYKSsee85L2WZJyzxCsbvqZ+/7eIp3BxW+31Ltk SZ6O58Av33aU9ji3XgEafMlJXXFMppvN+/BqOzTvd8Hyk62bOX5XmA5OKrBOE1c= =6xYC -----END PGP SIGNATURE----- --5E6Qh9CR1mLTKOKOpwu21tJ8XNBiNdQdp--