From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOugr-0006sf-5K for qemu-devel@nongnu.org; Tue, 02 Sep 2014 16:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOugm-0005vo-ML for qemu-devel@nongnu.org; Tue, 02 Sep 2014 16:28:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOugm-0005vk-Df for qemu-devel@nongnu.org; Tue, 02 Sep 2014 16:28:28 -0400 Message-ID: <54062861.5090808@redhat.com> Date: Tue, 02 Sep 2014 14:28:17 -0600 From: Eric Blake MIME-Version: 1.0 References: <1409671532-12706-1-git-send-email-david.marchand@6wind.com> <1409671532-12706-6-git-send-email-david.marchand@6wind.com> In-Reply-To: <1409671532-12706-6-git-send-email-david.marchand@6wind.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LhRFIOT3UI4mAaJNaTUMSD29UM2s4HK8v" Subject: Re: [Qemu-devel] [PATCH v4 05/14] contrib/ivshmem-*: switch to QEMU headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Marchand , qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, stefanha@gmail.com, claudio.fontana@huawei.com, armbru@redhat.com, arei.gonglei@huawei.com, pbonzini@redhat.com, jani.kokkonen@huawei.com, cam@cs.ualberta.ca This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LhRFIOT3UI4mAaJNaTUMSD29UM2s4HK8v Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/02/2014 09:25 AM, David Marchand wrote: > Reuse parsers from QEMU, C99 boolean. >=20 > Signed-off-by: David Marchand > --- > contrib/ivshmem-client/ivshmem-client.c | 12 +---- > contrib/ivshmem-client/ivshmem-client.h | 4 +- > contrib/ivshmem-client/main.c | 12 +---- > contrib/ivshmem-server/ivshmem-server.c | 14 +----- > contrib/ivshmem-server/ivshmem-server.h | 4 +- > contrib/ivshmem-server/main.c | 73 +++++------------------= -------- > 6 files changed, 20 insertions(+), 99 deletions(-) Why introduce code in patch 1 only to rip it back out in patch 5? Why not just squash these together and just introduce the contrib file correct on its first commit? > =20 > case 'l': /* shm_size */ > - if (parse_size(optarg, &args->shm_size) < 0) { > + parse_option_size("shm_size", optarg, &args->shm_size, &er= rp); > + if (errp) { > + error_free(errp); > fprintf(stderr, "cannot parse shm size\n"); It would be nicer to print the contents of errp, instead of discarding what is likely to be a more specific error message. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --LhRFIOT3UI4mAaJNaTUMSD29UM2s4HK8v 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 iQEcBAEBCAAGBQJUBihhAAoJEKeha0olJ0Nq5YEH+wfuf6+v/9Kz6isB8tH/BAZr 3c9/8sCUPWyRi3Ze2iBUA0gTWSZl8kYv5l3MsNhODRz84boF64Gh3zKw0NRO2Gov 3gyNIhotznyrMJYw9rrreFtXEycEWOmIYAZT5RDPrpaWJPIhns1mcUIDRhMwBt+L PR8+3DXE9eqWAZj+8xaXe8xnI6MOQ099iesG1G+p2IanmKdmXzQtM8UAUmOPa7lb Ynjtcf1C22HUJJ8ZfKGUKO8M0KhymD0aUG84cKXoSrnJ/aDcBfVDfOzJfTad6uis PJfCqt7L2ZJknYX0KhFdUeJbh66Dp+uy9737zHORz1d2lfCZzi0rsjtpE8czNw0= =XOYL -----END PGP SIGNATURE----- --LhRFIOT3UI4mAaJNaTUMSD29UM2s4HK8v--