Re: [PATCH] nodeinfo: fix detection of physical memory on uclibc/musl libc

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

 



On Tue, Apr 15, 2014 at 11:31:23AM +0200, Natanael Copa wrote:
> The gnulib's physmem_total will as a fallback report 64MB as total
> memory if sysconf(_SC_PHYS_PAGES) is unimplemented on linux. This makes
> it impossible to detect if physmem_total works or not, so we try first
> the linux only sysinfo(2) before falling back to gnulibs physmem_total.
> 
> This makes the total memory be correctly reported on musl libc and
> uclibc.
> 
> Signed-off-by: Natanael Copa <ncopa@xxxxxxxxxxxxxxx>
> ---
>  configure.ac   |  2 +-
>  src/nodeinfo.c | 22 ++++++++++++++++------
>  2 files changed, 17 insertions(+), 7 deletions(-)

I think you should instead patch the gnulib physmem_total() function
to support use of  sysinfo() itself. That way all the many users of
GNULIB will work correctly on musl/uclibc, rather than just libvirt.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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