]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Clarify the semantic of virDomainGetSchedulerParameters arguments
authorMatthias Bolte <matthias.bolte@googlemail.com>
Wed, 18 May 2011 08:52:57 +0000 (10:52 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Wed, 18 May 2011 16:20:47 +0000 (18:20 +0200)
commite430c0d0c689d3ca057b507f07bd12007d0055e0
tree00aef84c275979d8cc390a4e3a938ec66ee51ebf
parent7b2f20b10be903133419be9bed2fc02c1c14f513
Clarify the semantic of virDomainGetSchedulerParameters arguments

params and nparams are essential and cannot be NULL. Check this in
libvirt.c and remove redundant checks from the drivers (e.g. xend).

Instead of enforcing that nparams must point to exact same value as
returned by virDomainGetSchedulerType relax this to a lower bound
check. This is what some drivers (e.g. xen hypervisor and esx)
already did. Other drivers (e.g. xend) didn't check nparams at all
and assumed that there is enough space in params.

Unify the behavior in all drivers to a lower bound check and update
nparams to the number of valid values in params on success.
src/libvirt.c
src/libxl/libxl_driver.c
src/lxc/lxc_driver.c
src/qemu/qemu_driver.c
src/test/test_driver.c
src/xen/xen_driver.h
src/xen/xen_hypervisor.c
src/xen/xend_internal.c