From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX6X6-0004ww-8r for qemu-devel@nongnu.org; Thu, 25 Sep 2014 06:44:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XX6X0-000357-4u for qemu-devel@nongnu.org; Thu, 25 Sep 2014 06:44:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX6Wz-00034C-T1 for qemu-devel@nongnu.org; Thu, 25 Sep 2014 06:44:14 -0400 Date: Thu, 25 Sep 2014 11:44:04 +0100 From: Stefan Hajnoczi Message-ID: <20140925104404.GD19882@stefanha-thinkpad.redhat.com> References: <1411631642-4391-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kvUQC+jR9YzypDnK" Content-Disposition: inline In-Reply-To: <1411631642-4391-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block: Validate node-name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: benoit.canet@irqsave.net, qemu-devel@nongnu.org --kvUQC+jR9YzypDnK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 25, 2014 at 09:54:02AM +0200, Kevin Wolf wrote: > The device_name of a BlockDriverState is currently checked because it is > always used as a QemuOpts ID and qemu_opts_create() checks whether such > IDs are wellformed. >=20 > node-name is supposed to share the same namespace, but it isn't checked > currently. This patch adds explicit checks both for device_name and > node-name so that the same rules will still apply even if QemuOpts won't > be used any more at some point. >=20 > qemu-img used to use names with spaces in them, which isn't allowed any > more. Replace them with underscores. >=20 > Signed-off-by: Kevin Wolf > --- > v2: > - Fix qemu-img to use valid names internally [Stefan] >=20 > block.c | 16 +++++++++++++--- > include/qemu/option.h | 1 + > qemu-img.c | 6 +++--- > util/qemu-option.c | 4 ++-- > 4 files changed, 19 insertions(+), 8 deletions(-) Reviewed-by: Stefan Hajnoczi --kvUQC+jR9YzypDnK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUI/HzAAoJEJykq7OBq3PIIVcH/095rPYDh3y8koRpCPDUCur3 Uro4d8YVtEA/ZUVcBpKNyIyYrAdHaGi7J+zAiWjxWgVA8XsxXW3ErxbyIL/pv2Pc jUhDYjEKHPk1r5qmIEv8rfRZikXg/f0zzTXWAbJSaK5U298chtLQQSkw+7UfimYF DFSaIuspuYTzgt2jdn1I8hs5Nn0h6BhPXMgvWDEGguhrwNL1HrH52eOygJFvW3GB vC5VIlbYwLxkfVHFfh+8kMKj1xCBsb6C00FpR+coDKscS/p/e6TPNxvBfWheVSWX co2zAx4W/cGwj3otkBoiSuzR/BVKiMeP5Wcn5eUQ8GqCTff3BWCYhn9h31NGh50= =l59C -----END PGP SIGNATURE----- --kvUQC+jR9YzypDnK--