Re: [PATCH 5/5] setmem: add the new options to "virsh setmem" command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]