From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXDHq-0005XN-CV for qemu-devel@nongnu.org; Wed, 02 Sep 2015 15:01:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXDHp-0001vg-Gh for qemu-devel@nongnu.org; Wed, 02 Sep 2015 15:01:34 -0400 References: <1441183880-26993-1-git-send-email-wency@cn.fujitsu.com> <1441183880-26993-6-git-send-email-wency@cn.fujitsu.com> From: Eric Blake Message-ID: <55E74780.4040804@redhat.com> Date: Wed, 2 Sep 2015 13:01:20 -0600 MIME-Version: 1.0 In-Reply-To: <1441183880-26993-6-git-send-email-wency@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rVD6r7lFhPR0gIejS81b5mq5P8nnEEpvX" Subject: Re: [Qemu-devel] [PATCH 05/16] introduce a new API qemu_opts_absorb_qdict_by_index() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang , qemu devel , Fam Zheng , Max Reitz , Paolo Bonzini , Stefan Hajnoczi Cc: Kevin Wolf , zhanghailiang , qemu block , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , "Michael R. Hines" , Gonglei , Yang Hongyang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rVD6r7lFhPR0gIejS81b5mq5P8nnEEpvX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/02/2015 02:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei Commit message is a bit sparse. > --- > include/qemu/option.h | 2 ++ > util/qemu-option.c | 44 +++++++++++++++++++++++++++++++++++++++++++= + > 2 files changed, 46 insertions(+) >=20 Missing testsuite exposure of the new function. > /* > + * Adds all QDict entries to the QemuOpts that can be added and remove= s them > + * from the QDict. The key starts with "%index." in the %qdict. When t= his "%index." reads awkwardly (I thought it was a printf-style format). But I'm not sure if "starts with %index followed by '.'" is any better. > + * function returns, the QDict contains only those entries that couldn= 't be > + * added to the QemuOpts. > + */ > +void qemu_opts_absorb_qdict_by_index(QemuOpts *opts, QDict *qdict, > + const char *index, Error **errp) > +{ I didn't review the algorithm closely, but here's a superficial comment: > + const QDictEntry *entry, *next; > + const char *key; > + int len =3D strlen(index); size_t --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --rVD6r7lFhPR0gIejS81b5mq5P8nnEEpvX 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/ iQEcBAEBCAAGBQJV50eAAAoJEKeha0olJ0NqBH4H/RO4RWD7tFwI5mwXWZaKhDD8 tePhRXpYL6Sl9RQftVqpoPrfwOCjG9IvVbFbF7RPDq2K+y3uthBsKo0Ff9H0cRio sRN7A8Ru5t6BRRyrvhO61lrCboiaFzZlxSpxdnvl+efiTVLEjUyAOpYUN7Fyb/uH GzKrT/miJLhHsXGfzaPXo2HaohHpBGO8W4EYtGN6yXq42lGL2uRBVvspu15qh8SM 9UhQHTI/GP+SZtVpD5KnQ6Em+75XWDi7ag1aj0IRKVDZhNXUYtqvJoV98lhT/cQX LBj8FP0KT16PjmB6ASdCXOUlreiE9ET/dH2LYAoXf0q2T/hBXPSgoZm52a9yQzc= =oNr8 -----END PGP SIGNATURE----- --rVD6r7lFhPR0gIejS81b5mq5P8nnEEpvX--