On 03/09/2011 04:59 PM, Daniel P. Berrange wrote:
> > + if (!flags) {
> > + if (virDomainSetMemory(dom, kilobytes) != 0) {
> > + ret = FALSE;
> > + }
Indentation went a little bit wrong here. Also '!flags' could
in fact be '!flags || (flags == VIR_DOMAIN_MEM_LIVE)' since if
only the --live flag was set, we can still use the original API
call for greater backcompatibility.
Perhaps this choice of APIs should be done in libvirt rather than virsh
(with virsh always calling the new API). This way all clients can talk
to an older remote libvirt without having to care about
virDomainSetMemory vs. virDomainSetMemoryFlags.
Paolo