From acb83a2b742653c4c45790419ebeb804a07845d5 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Sat, 4 Jun 2016 00:00:00 -0500 Subject: [PATCH] vmstat: adapted to the interface changes, api This commit just eliminates all the procps_vmstat_read calls since the interface now handles that requirement as needed when the 'get' and 'select' guys are called. Signed-off-by: Jim Warner --- vmstat.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vmstat.c b/vmstat.c index 78792d69..162b3f39 100644 --- a/vmstat.c +++ b/vmstat.c @@ -291,9 +291,6 @@ static void new_format(void) if (procps_vmstat_new(&vm_info) < 0) xerrx(EXIT_FAILURE, _("Unable to create vmstat structure")); - if (procps_vmstat_read(vm_info) < 0) - xerrx(EXIT_FAILURE, - _("Unable to read vmstat information")); if (procps_stat_new(&sys_info) < 0) xerrx(EXIT_FAILURE, _("Unable to create system stat structure")); @@ -366,9 +363,6 @@ static void new_format(void) new_header(); tog = !tog; - if (procps_vmstat_read(vm_info) < 0) - xerrx(EXIT_FAILURE, - _("Unable to read vmstat information")); if ((stat_stack = procps_stat_select(sys_info, Loop_stat_items, 12)) == NULL) xerrx(EXIT_FAILURE, _("Unable to select stat information")); @@ -830,10 +824,6 @@ static void sum_format(void) if (procps_vmstat_new(&vm_info) < 0) xerrx(EXIT_FAILURE, _("Unable to create vmstat structure")); - if (procps_vmstat_read(vm_info) < 0) - xerrx(EXIT_FAILURE, - _("Unable to read vmstat information")); - if (procps_meminfo_new(&mem_info) < 0) xerrx(EXIT_FAILURE, _("Unable to create meminfo structure")); if ((mem_stack = procps_meminfo_select(mem_info, Sum_mem_items, 10)) ==