Re: [PATCH 23/34] conf: disallow empty cpuset for emulatorpin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 01/14/2016 11:27 AM, Peter Krempa wrote:
> It's disallowed in the API.
> ---
>  src/conf/domain_conf.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 

Same thoughts as 22/34

John
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 1036057..e27de96 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -14246,8 +14246,18 @@ virDomainEmulatorPinDefParseXML(xmlNodePtr node)
>          return NULL;
>      }
> 
> -    ignore_value(virBitmapParse(tmp, 0, &def, VIR_DOMAIN_CPUMASK_LEN));
> +    if (virBitmapParse(tmp, 0, &def, VIR_DOMAIN_CPUMASK_LEN) < 0)
> +        goto cleanup;
> +
> +    if (virBitmapIsAllClear(def)) {
> +        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> +                       _("Invalid value of 'cpuset': %s"), tmp);
> +        virBitmapFree(def);
> +        def = NULL;
> +        goto cleanup;
> +    }
> 
> + cleanup:
>      VIR_FREE(tmp);
>      return def;
>  }
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]