top: trade 'look_up_our_self' for a new API equivalent

With the advent of the 'fatal_proc_unmounted' function
in the <pids.h> API to ensure the /proc filesystem was
mounted, we will finally get rid of the last remaining
vestiges of the former libprocps <readproc> 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 <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2015-09-11 00:00:00 -05:00 committed by Craig Small
parent 007e032805
commit 872be3a3a2

View File

@ -50,15 +50,11 @@
#include "../include/signals.h"
#include "../include/nls.h"
#include "../proc/devname.h"
#include <proc/meminfo.h>
#include <proc/pids.h>
#include "../proc/procps.h"
#include "../proc/readproc.h"
#include <proc/readstat.h>
#include "../proc/sysinfo.h"
#include <proc/sysinfo.h>
#include <proc/version.h>
#include "../proc/wchan.h"
#include <proc/uptime.h>
#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, '/');