svn commit: r230781 - stable/9/bin/ps
Mikolaj Golub
trociny at FreeBSD.org
Mon Jan 30 19:34:42 UTC 2012
Author: trociny
Date: Mon Jan 30 19:34:41 2012
New Revision: 230781
URL: http://svn.freebsd.org/changeset/base/230781
Log:
MFC r227840, r227846:
r227840:
No need in procfs(5).
r227846
Remove yet another outdated note about procfs(5) being required.
Spotted by: arundel
Modified:
stable/9/bin/ps/ps.1
stable/9/bin/ps/ps.c
Directory Properties:
stable/9/bin/ps/ (props changed)
Modified: stable/9/bin/ps/ps.1
==============================================================================
--- stable/9/bin/ps/ps.1 Mon Jan 30 19:32:33 2012 (r230780)
+++ stable/9/bin/ps/ps.1 Mon Jan 30 19:34:41 2012 (r230781)
@@ -29,7 +29,7 @@
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd October 1, 2011
+.Dd November 22, 2011
.Dt PS 1
.Os
.Sh NAME
@@ -98,12 +98,6 @@ The default output format includes, for
controlling terminal, state, CPU time (including both user and system time)
and associated command.
.Pp
-The process file system (see
-.Xr procfs 5 )
-should be mounted when
-.Nm
-is executed, otherwise not all information will be available.
-.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl a
@@ -682,9 +676,6 @@ attempts to automatically determine the
.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 ,
Modified: stable/9/bin/ps/ps.c
==============================================================================
--- stable/9/bin/ps/ps.c Mon Jan 30 19:32:33 2012 (r230780)
+++ stable/9/bin/ps/ps.c Mon Jan 30 19:34:41 2012 (r230781)
@@ -132,7 +132,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 *);
@@ -412,14 +411,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.
*/
@@ -1317,18 +1308,6 @@ kludge_oldps_options(const char *optlist
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)
{
More information about the svn-src-stable-9
mailing list