misc: adapted other programs to changes, <MEMINFO> api

This patch just brings *most* other programs into line
with those changes recently made in the <meminfo> API.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2016-05-11 12:00:00 -05:00
committed by Craig Small
parent 407f1b71de
commit d94af0d07a
3 changed files with 43 additions and 54 deletions

View File

@@ -104,10 +104,7 @@ static void get_memory_total()
if (procps_meminfo_new(&mem_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to create meminfo structure"));
if (procps_meminfo_read(mem_info) < 0)
xerrx(EXIT_FAILURE,
_("Unable to read meminfo information"));
memory_total = procps_meminfo_get(mem_info, PROCPS_MEM_TOTAL);
memory_total = procps_meminfo_get(mem_info, PROCPS_MEMINFO_MEM_TOTAL);
procps_meminfo_unref(&mem_info);
}