[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