[libvirt] [PATCH 06/11] openvz: Need to error check openvzDomainSetVcpusFlagsInternal()

Osier Yang jyang at redhat.com
Thu Jan 31 11:07:25 UTC 2013


On 2013年01月31日 03:36, John Ferlan wrote:
> ---
>   src/openvz/openvz_driver.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
> index e12a84b..61d8390 100644
> --- a/src/openvz/openvz_driver.c
> +++ b/src/openvz/openvz_driver.c
> @@ -1,7 +1,7 @@
>   /*
>    * openvz_driver.c: core driver methods for managing OpenVZ VEs
>    *
> - * Copyright (C) 2010-2012 Red Hat, Inc.
> + * Copyright (C) 2010-2013 Red Hat, Inc.
>    * Copyright (C) 2006, 2007 Binary Karma
>    * Copyright (C) 2006 Shuveb Hussain
>    * Copyright (C) 2007 Anoop Joe Cyriac
> @@ -1367,7 +1367,12 @@ static int openvzDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
>           goto cleanup;
>       }
>
> -    openvzDomainSetVcpusInternal(vm, nvcpus);
> +    if (openvzDomainSetVcpusInternal(vm, nvcpus)<  0) {
> +        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> +                       _("Could not set number of virtual cpu"));

Generally, we use the term "vCPU".

> +        goto cleanup;
> +    }
> +
>       ret = 0;
>
>   cleanup:

ACK with small change.




More information about the libvir-list mailing list