[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/3] qga: implement qmp_guest_set_vcpus() for
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/3] qga: implement qmp_guest_set_vcpus() for Linux with sysfs |
Date: |
Wed, 06 Mar 2013 16:20:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 |
On 03/06/2013 02:59 PM, Laszlo Ersek wrote:
> Signed-off-by: Laszlo Ersek <address@hidden>
> ---
> qga/commands-posix.c | 38 ++++++++++++++++++++++++++++++++------
> 1 files changed, 32 insertions(+), 6 deletions(-)
>
>
> +int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
> +{
> + int64_t processed;
> + Error *local_err = NULL;
> +
> + processed = 0;
> + while (vcpus != NULL) {
> + transfer_vcpu(vcpus->value, false, &local_err);
> + if (local_err != NULL) {
> + break;
> + }
> + ++processed;
> + vcpus = vcpus->next;
> + }
> +
> + if (local_err != NULL) {
> + if (processed == 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 <address@hidden>
if I didn't find a reason for a respin.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature