On 05/17/2011 12:20 AM, Hu Tao wrote: > This new function allows aditional flags to be passed into from
s/aditional/additional/
> the virsh command line.
> ---
> include/libvirt/libvirt.h.in | 14 +++++++++
> python/generator.py | 1 +
> src/driver.h | 8 +++++
> src/libvirt.c | 64
> ++++++++++++++++++++++++++++++++++++++++++
> src/libvirt_public.syms | 1 +
> 5 files changed, 88 insertions(+), 0 deletions(-)
>
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index f4d0b40..ec32b4b 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -295,6 +295,12 @@ typedef enum {
> VIR_DOMAIN_SCHED_FIELD_BOOLEAN = 6 /* boolean(character) case */
> } virSchedParameterType;
>
> +typedef enum {
> + VIR_DOMAIN_SCHEDPARAM_CURRENT = (1 << 0), /* affect current domain state
> */
This should be 0,
> + VIR_DOMAIN_SCHEDPARAM_LIVE = (1 << 1), /* Affect active domain */
> + VIR_DOMAIN_SCHEDPARAM_CONFIG = (1 << 2), /* Affect next boot */
and these 1 and 2 (1 << 0, 1 << 2).
> +++ b/src/libvirt.c
> @@ -5104,6 +5104,70 @@ error:
>
>
> /**
> + * virDomainSetSchedulerParametersFlags:
> + * @domain: pointer to domain object
> + * @params: pointer to scheduler parameter objects
> + * @nparams: number of scheduler parameter
> + * (this value should be same or less than the returned value
> + * nparams of virDomainGetSchedulerType)
Can @nparams be 0, and if so, can @params be NULL and use this as a way
to query the correct nparams setting (rather than having to call
virDomainGetSchedulerType)? Related to my comment on Matthias's
libvirt.c cleanup.
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
