2011/3/10 Eric Blake <eblake@xxxxxxxxxx>: > * src/esx/esx_driver.c (esxDomainSetMemory): Move guts... > (esxDomainSetMemoryFlags): ...here. > * src/lxc/lxc_driver.c (lxcDomainSetMemory) > (lxcDomainSetMemoryFlags): Likewise. > * src/test/test_driver.c (testSetMemory, testSetMemoryFlags): > Likewise. > * src/uml/uml_driver.c (umlDomainSetMemory) > (umlDomainSetMemoryFlags): Likewise. > * src/vbox/vbox_tmpl.c (vboxDomainSetMemory) > (vboxDomainSetMemoryFlags): Likewise. > * src/xen/xen_driver.c (xenUnifiedDomainSetMemory) > (xenUnifiedDomainSetMemoryFlags): Likewise. > --- > >> Hmm, for other API additions, I have provided dummy wrappers for the new >> function anywhere the old function existed, that merely require the same >> flags as the old function would use. ÂI'll probably propose that as a >> followup patch. > > Like so. > > Âsrc/esx/esx_driver.c  |  17 ++++++++++++++--- > Âsrc/lxc/lxc_driver.c  |  15 +++++++++++++-- > Âsrc/test/test_driver.c |  19 ++++++++++++++++--- > Âsrc/uml/uml_driver.c  |  15 +++++++++++++-- > Âsrc/vbox/vbox_tmpl.c  |  15 +++++++++++++-- > Âsrc/xen/xen_driver.c  |  15 ++++++++++++++- > Â6 files changed, 83 insertions(+), 13 deletions(-) > > diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c > index 37e104e..a2d8433 100644 > --- a/src/esx/esx_driver.c > +++ b/src/esx/esx_driver.c > @@ -2111,7 +2111,8 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) > > > Âstatic int > -esxDomainSetMemory(virDomainPtr domain, unsigned long memory) > +esxDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory, > +            Âunsigned int flags) > Â{ >   int result = -1; >   esxPrivate *priv = domain->conn->privateData; > @@ -2121,6 +2122,12 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory) >   esxVI_TaskInfoState taskInfoState; >   char *taskInfoErrorMessage = NULL; > > +  Âif (flags != VIR_DOMAIN_MEM_LIVE) { > +    ÂESX_ERROR(VIR_ERR_INVALID_ARG, > +         Â_("invalid flag combination: (0x%x)"), flags); > +    Âreturn -1; > +  Â} > + Actually this doesn't match with what ESX really does. There is no such thing like distinct values for _LIVE and _CONFIG. Changing the memory value always affects a running domain and is persistent at the same time. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list