[libvirt] [PATCH 5/5] setmem: add the new options to "virsh setmem" command
Eric Blake
eblake at redhat.com
Thu Mar 10 21:31:02 UTC 2011
On 03/10/2011 12:44 AM, Paolo Bonzini wrote:
> 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.
Perhaps so, but that's a bigger task better left for a separate patch
(if we do that in libvirt.c for one API, we should do it for all of them
that fit the same pattern of a new function that subsumes functionality
of an older one - I can think of several).
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110310/9ecbc7d0/attachment-0001.sig>
More information about the libvir-list
mailing list