Re: [PATCH] php: implement libvirt_node_get_free_memory.

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

 



[meta-comment]

On 05/01/2014 12:33 PM, Dawid Zamirski wrote:
> This patch adds support for virNodeGetFreeMemory which is available in
> libvirt since v0.3.3. While the php bindings alredy provide
> libvirt_node_get_mem_stats from which such info could be obtained, not
> all hypervisors support it, e.g. vbox and esx driver don't have it but
> they do implement virNodeGetFreeMemory.
> 
> Since virNodeGetFreeMemory returns free bytes as unsigned long long
> which PHP cannot handle, I've added LONGLONG_RETURN_AS_STRING macro
> which returns the amount bytes as a string - similarly to how bcmath
> handles such numbers.
> ---
>  src/libvirt-php.c | 30 ++++++++++++++++++++++++++++++
>  src/libvirt-php.h |  1 +
>  2 files changed, 31 insertions(+)

I'm not a PHP expert, so I'll let others review the patch itself.  But
when contributing patches to libvirt-php.git, it helps if you do:
 git config format.subjectprefix "php PATCH"
to make it obvious which repo you are targetting with your patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]