summaryrefslogtreecommitdiffstats
path: root/bin/ps
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2011-11-22 21:14:46 +0000
committertrociny <trociny@FreeBSD.org>2011-11-22 21:14:46 +0000
commitc75c44db76dca4624111acba97d68fb52053cd7b (patch)
treef0a6c2856dfd51781f7745e31623b4d284f6584b /bin/ps
parent94a46763e74b5869dcee59c6ccd76ed8d25d3c73 (diff)
downloadFreeBSD-src-c75c44db76dca4624111acba97d68fb52053cd7b.zip
FreeBSD-src-c75c44db76dca4624111acba97d68fb52053cd7b.tar.gz
No need in procfs(5).
MFC after: 2 weeks
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/ps.15
-rw-r--r--bin/ps/ps.c21
2 files changed, 1 insertions, 25 deletions
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1
index 1787b400..be6035d 100644
--- a/bin/ps/ps.1
+++ b/bin/ps/ps.1
@@ -29,7 +29,7 @@
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd October 30, 2011
+.Dd November 22, 2011
.Dt PS 1
.Os
.Sh NAME
@@ -686,9 +686,6 @@ attempts to automatically determine the terminal width.
.Bl -tag -width ".Pa /boot/kernel/kernel" -compact
.It Pa /boot/kernel/kernel
default system namelist
-.It Pa /proc
-the mount point of
-.Xr procfs 5
.El
.Sh SEE ALSO
.Xr kill 1 ,
diff --git a/bin/ps/ps.c b/bin/ps/ps.c
index eb2d630..2171bc1 100644
--- a/bin/ps/ps.c
+++ b/bin/ps/ps.c
@@ -130,7 +130,6 @@ struct listinfo {
} l;
};
-static int check_procfs(void);
static int addelem_gid(struct listinfo *, const char *);
static int addelem_pid(struct listinfo *, const char *);
static int addelem_tty(struct listinfo *, const char *);
@@ -411,14 +410,6 @@ main(int argc, char *argv[])
argv += optind;
/*
- * If the user specified ps -e then they want a copy of the process
- * environment kvm_getenvv(3) attempts to open /proc/<pid>/mem.
- * Check to make sure that procfs is mounted on /proc, otherwise
- * print a warning informing the user that output will be incomplete.
- */
- if (needenv == 1 && check_procfs() == 0)
- warnx("Process environment requires procfs(5)");
- /*
* If there arguments after processing all the options, attempt
* to treat them as a list of process ids.
*/
@@ -1360,18 +1351,6 @@ kludge_oldps_options(const char *optlist, char *origval, const char *nextarg)
return (newopts);
}
-static int
-check_procfs(void)
-{
- struct statfs mnt;
-
- if (statfs("/proc", &mnt) < 0)
- return (0);
- if (strcmp(mnt.f_fstypename, "procfs") != 0)
- return (0);
- return (1);
-}
-
static void
usage(void)
{
OpenPOWER on IntegriCloud