[libvirt] [PATCHv2 4/8] sched: introduce virDomainGetSchedulerParametersFlags

Eric Blake eblake at redhat.com
Thu May 26 19:26:32 UTC 2011


On 05/26/2011 12:17 PM, Eric Blake wrote:
> If we can choose live or config when setting, then we need to
> be able to choose which one we are querying.
> 
> Also, make the documentation clear that set must use a non-empty
> subset (some of the hypervisors fail if params is NULL).
> 
> +int
> +virDomainGetSchedulerParametersFlags(virDomainPtr domain,
> +                                     virTypedParameterPtr params, int *nparams,
> +                                     unsigned int flags)
> +{
> +    virConnectPtr conn;
> +
> +    VIR_DOMAIN_DEBUG(domain, "params=%p, nparams=%p, flags=%u",
> +                     params, nparams, flags);
> +
> +    virResetLastError();
> +
> +    if (!(flags & (VIR_DOMAIN_SCHEDPARAM_LIVE |
> +                   VIR_DOMAIN_SCHEDPARAM_CONFIG |
> +                   VIR_DOMAIN_SCHEDPARAM_CURRENT))) {
> +        virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
> +        virDispatchError(NULL);
> +        return -1;

Aargh - I missed a review comment that the front end should not filter
flags, but instead each driver.  v3 coming up.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110526/6b67c641/attachment-0001.sig>


More information about the libvir-list mailing list