From 872be3a3a2e485c65f3def3d1f13fb2acc46cdfe Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Fri, 11 Sep 2015 00:00:00 -0500 Subject: [PATCH] top: trade 'look_up_our_self' for a new API equivalent With the advent of the 'fatal_proc_unmounted' function in the API to ensure the /proc filesystem was mounted, we will finally get rid of the last remaining vestiges of the former libprocps interface. [ also play a little catch up and whack some headers ] [ that are not necessary now, beyond that readproc.h ] Signed-off-by: Jim Warner --- top/top.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/top/top.c b/top/top.c index 8418896e..36b7da76 100644 --- a/top/top.c +++ b/top/top.c @@ -50,15 +50,11 @@ #include "../include/signals.h" #include "../include/nls.h" -#include "../proc/devname.h" #include #include -#include "../proc/procps.h" -#include "../proc/readproc.h" #include -#include "../proc/sysinfo.h" +#include #include -#include "../proc/wchan.h" #include #include "top.h" @@ -2873,7 +2869,6 @@ signify_that: * No matter what *they* say, we handle the really really BIG and * IMPORTANT stuff upon which all those lessor functions depend! */ static void before (char *me) { - static proc_t p; struct sigaction sa; int i; int linux_version_code = procps_linux_version(); @@ -2881,7 +2876,7 @@ static void before (char *me) { atexit(close_stdout); // is /proc mounted? - look_up_our_self(&p); + fatal_proc_unmounted(NULL, 0); // setup our program name Myname = strrchr(me, '/');