From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDNe2-0007vr-9Y for qemu-devel@nongnu.org; Wed, 06 Mar 2013 18:21:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDNdz-0004Zs-Uj for qemu-devel@nongnu.org; Wed, 06 Mar 2013 18:21:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDNdz-0004Zk-LY for qemu-devel@nongnu.org; Wed, 06 Mar 2013 18:21:07 -0500 Message-ID: <5137CF38.50301@redhat.com> Date: Wed, 06 Mar 2013 16:20:24 -0700 From: Eric Blake MIME-Version: 1.0 References: <1362607171-24668-1-git-send-email-lersek@redhat.com> <1362607171-24668-4-git-send-email-lersek@redhat.com> In-Reply-To: <1362607171-24668-4-git-send-email-lersek@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2UNUIHWRBMCUKVKEXUJEW" Subject: Re: [Qemu-devel] [PATCH v2 3/3] qga: implement qmp_guest_set_vcpus() for Linux with sysfs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UNUIHWRBMCUKVKEXUJEW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/06/2013 02:59 PM, Laszlo Ersek wrote: > Signed-off-by: Laszlo Ersek > --- > qga/commands-posix.c | 38 ++++++++++++++++++++++++++++++++------ > 1 files changed, 32 insertions(+), 6 deletions(-) >=20 > =20 > +int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **= errp) > +{ > + int64_t processed; > + Error *local_err =3D NULL; > + > + processed =3D 0; > + while (vcpus !=3D NULL) { > + transfer_vcpu(vcpus->value, false, &local_err); > + if (local_err !=3D NULL) { > + break; > + } > + ++processed; > + vcpus =3D vcpus->next; > + } > + > + if (local_err !=3D NULL) { > + if (processed =3D=3D 0) { > + error_propagate(errp, local_err); Do we need to set processed to -1 here, to flag to the caller that we propagated an error? I'm not sure enough of the mechanics of the call chain, so maybe this already works even if you leave things as returning = 0. Depending on that answer, you can add: Reviewed-by: Eric Blake if I didn't find a reason for a respin. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2UNUIHWRBMCUKVKEXUJEW 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRN884AAoJEKeha0olJ0NqDL0H/jckvqGPZTBpi2rP56mcKHzZ 7TCeutKEREua2fwfvxxszLMFq6j1Mlh9XnLryjnjjMD+kzxpPsqPxuej1RBIPHqx hCn+5zubbvQFgwpAflNqHze9hDIw9F4n8YtxAcgA3dpMvVnPAnXagP/psbX1/3kq 8lDCUBtUtz1S+cibUhNs7b9L8mbDYGW8gL8YRu4zDhtU8NNwRYZmmMBJqqKBV0CY cFMkEhLdbobrcw58LEl/QHXpFBKGkPfsT1xReJNEM/8oVpn8KHemzX+r6jNtRcW3 DVOAV8GYIVv3gY4Xw2oHJuL5VoUiBwqcfzZSZYSsRy2D+NMxxPK5iA3nRpYlmjQ= =b7d5 -----END PGP SIGNATURE----- ------enig2UNUIHWRBMCUKVKEXUJEW--