Re: [PATCH] physmem: use sysinfo on linux for physmem_total

2014-04-18 Thread Natanael Copa
On Thu, 17 Apr 2014 01:26:13 +0100 Pádraig Brady wrote: > On 04/15/2014 03:49 PM, Pádraig Brady wrote: > > On 04/15/2014 03:43 PM, Natanael Copa wrote: > >> * lib/physmem.c (physmem_total): Some systems like musl libc does not > >> (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo first

Re: [PATCH] physmem: use sysinfo on linux for physmem_total

2014-04-16 Thread Pádraig Brady
On 04/15/2014 03:49 PM, Pádraig Brady wrote: > On 04/15/2014 03:43 PM, Natanael Copa wrote: >> * lib/physmem.c (physmem_total): Some systems like musl libc does not >> (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo first and >> fallback to sysconf with _SC_PHYS_PAGES and _SC_PAGESIZE.

Re: [PATCH] physmem: use sysinfo on linux for physmem_total

2014-04-15 Thread Pádraig Brady
On 04/15/2014 03:43 PM, Natanael Copa wrote: > * lib/physmem.c (physmem_total): Some systems like musl libc does not > (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo first and > fallback to sysconf with _SC_PHYS_PAGES and _SC_PAGESIZE. This looks good. I confirmed the values are the s

[PATCH] physmem: use sysinfo on linux for physmem_total

2014-04-15 Thread Natanael Copa
* lib/physmem.c (physmem_total): Some systems like musl libc does not (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo first and fallback to sysconf with _SC_PHYS_PAGES and _SC_PAGESIZE. Signed-off-by: Natanael Copa --- lib/physmem.c | 13 - m4/physmem.m4 | 2 +- 2 files