]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
API: prevent query of --live and --config at once
authorEric Blake <eblake@redhat.com>
Tue, 15 Nov 2011 00:11:18 +0000 (17:11 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 29 Nov 2011 17:53:26 +0000 (10:53 -0700)
commit4199f3de2ef9715750f4d76a539bc37ca71edd2c
treea472c1ed8425bd7273a96123f68584a17daf12e0
parent80eaa56561d82a533ac33c8295fc2e5ae0f84b95
API: prevent query of --live and --config at once

Drivers were inconsistent when presented both --live and --config
at once.  For example, within qemu, getting memory parameters
favored live, getting blkio tuning favored config, and getting
scheduler parameters errored out.  Also, some, but not all,
attempts to mix flags on query were filtered at the virsh level.
We shouldn't have to duplicate efforts in every client app, nor
in every driver.  So, it is simpler to just enforce that the two
flags cannot both be used at once on query operations, which has
precedent in libvirt.c, and which matches the documentation of
virDomainModificationImpact.

* src/libvirt.c (virDomainGetMemoryParameters)
(virDomainGetBlkioParameters)
(virDomainGetSchedulerParametersFlags, virDomainGetVcpuPinInfo):
Borrow sanity checking from virDomainGetVcpusFlags.
src/libvirt.c