From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYzO1-0004NO-1b for qemu-devel@nongnu.org; Tue, 30 Sep 2014 11:30:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYzNw-000448-5E for qemu-devel@nongnu.org; Tue, 30 Sep 2014 11:30:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYzNv-00043v-O7 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 11:30:39 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8UFUcrV024385 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 30 Sep 2014 11:30:38 -0400 Message-ID: <542ACC9D.8020502@redhat.com> Date: Tue, 30 Sep 2014 09:30:37 -0600 From: Eric Blake MIME-Version: 1.0 References: <1412078370-3555-1-git-send-email-armbru@redhat.com> In-Reply-To: <1412078370-3555-1-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="epHLPpx0206A1fvUx9W9TPccbTtJixiPm" 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 , qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --epHLPpx0206A1fvUx9W9TPccbTtJixiPm Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/30/2014 05:59 AM, 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 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --epHLPpx0206A1fvUx9W9TPccbTtJixiPm 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 iQEcBAEBCAAGBQJUKsydAAoJEKeha0olJ0NqChQH/1/l1nAJWOOi01iY3op/tTzN 5BbQ83kSalxfFWYjhbIvtKIslPiubYPGeHUkqLdKkWe04BhK8IM78NFMd6SXpOef o7uibA7PzhA3WYlGNQ/S38KAeTIwtSYHBTelij/wN7qk9UuMteuxaA1FseKum9VU kNwlkS08Ss/K8w/JF2ZEFm3iA0kvT3Tb+W7GWzddYpNbmklCnHKMpJHT7W6fwnHt IA8zreGMHyb/9wrYGzfOE8kfFR4DQYpupysELcv9ii0Ltseup+2PnMG9+l008qJm lL7FUENQmxYBCFQSgZClV+qPb0Xj1tOAiG1cg/p2omb0IL3FN7cMOn7TBrAxLYU= =e2YV -----END PGP SIGNATURE----- --epHLPpx0206A1fvUx9W9TPccbTtJixiPm--