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(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org