From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZyVJ-0003KP-Um for qemu-devel@nongnu.org; Fri, 03 Oct 2014 04:46:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZyVF-00081p-4j for qemu-devel@nongnu.org; Fri, 03 Oct 2014 04:46:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZyVE-00081a-Tq for qemu-devel@nongnu.org; Fri, 03 Oct 2014 04:46:17 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s938kFbJ012110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 3 Oct 2014 04:46:15 -0400 Date: Fri, 3 Oct 2014 09:46:13 +0100 From: Stefan Hajnoczi Message-ID: <20141003084613.GA8507@stefanha-thinkpad.redhat.com> References: <1412078370-3555-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <1412078370-3555-1-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH] util: Emancipate id_wellformed() from QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 30, 2014 at 01:59:30PM +0200, Markus Armbruster wrote: > IDs have long spread beyond QemuOpts: not everything with an ID > necessarily goes through QemuOpts. Commit 9aebf3b is about such a > case: block layer names are meant to be well-formed IDs, but some of > them don't go through QemuOpts, and thus weren't checked. The commit > fixed that the straightforward way: rename the internal QemuOpts > helper id_wellformed() to qemu_opts_id_wellformed() and give it > external linkage. >=20 > Instead of using it directly in block.c, the commit adds wrapper > bdrv_is_valid_name(), probably to hide the connection to QemuOpts. >=20 > Go one logical step further: emancipate IDs from QemuOpts. Rename the > function back to id_wellformed(), and put it in another file. While > there, clean up its value to bool. Peel off the bdrv_is_valid_name() > wrapper. > --- > block.c | 9 ++------- > include/qemu-common.h | 3 +++ > include/qemu/option.h | 1 - > util/Makefile.objs | 1 + > util/id.c | 28 ++++++++++++++++++++++++++++ > util/qemu-option.c | 17 +---------------- > 6 files changed, 35 insertions(+), 24 deletions(-) > create mode 100644 util/id.c Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJULmJVAAoJEJykq7OBq3PILooIALD0vvkQ60F9+AS9n29kd+AC ky46WdYnxQ3Zk6YtLufMuMCmyNiV3YCQ4JLOlXwZqAWUtG8NBcWjKjDv8B+sJByx jD63FroZZB3tq6nZUCXd/RqhLaGrag0q7+MYrF1vjR5/wqLTnij3+fWmOx3tKyVL 5U6Zu4HG8HS0Pgwm49NzU7Qa5S/XKuRb9DUjwN/A+hFhh6fs4nzwgZiSQdeGMk73 eNG/1go6E1sLgbpXCNVMyJET1h/KGVXSKzKasXOlQiRjVz9TOpHKaNCS2WZF9ICz X2FjeC+h7/timm0Va82MqBtfR2pB/GEa6yp9yUOdiD4sED7Fy/4jumnyT8w6/I8= =9eIJ -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--