summaryrefslogtreecommitdiff
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorIgor Sobrado <sobrado@cvs.openbsd.org>2007-10-01 22:06:03 +0000
committerIgor Sobrado <sobrado@cvs.openbsd.org>2007-10-01 22:06:03 +0000
commita6b481e93e8e14c27731c12457de6fdb40c61dd6 (patch)
tree169a63f1918b8d19044dc1284256c7e0939c55e0 /usr.bin/fstat
parenteeaf0681ea4c3ea8154ccbbaad4d16bb15219ce3 (diff)
sort the fields in manual page in the same order as in fstat output;
use the same name for fields in the manual page and command output; while here, fix spacing millert@ has observed that this change makes the header fields consistent with what is the output by NetBSD and FreeBSD too ok millert@
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fstat.124
-rw-r--r--usr.bin/fstat/fstat.c14
2 files changed, 19 insertions, 19 deletions
diff --git a/usr.bin/fstat/fstat.1 b/usr.bin/fstat/fstat.1
index 8fc1d1a8a20..f5ec6120d83 100644
--- a/usr.bin/fstat/fstat.1
+++ b/usr.bin/fstat/fstat.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fstat.1,v 1.37 2007/05/31 19:20:10 jmc Exp $
+.\" $OpenBSD: fstat.1,v 1.38 2007/10/01 22:06:02 sobrado Exp $
.\"
.\" Copyright (c) 1987, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)fstat.1 8.3 (Berkeley) 2/25/94
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: October 1 2007 $
.Dt FSTAT 1
.Os
.Sh NAME
@@ -153,6 +153,16 @@ using a symbolic format (see
.Xr strmode 3 ) ;
otherwise, the mode is printed
as an octal number.
+.It Li R/W
+This column describes the access mode that the file allows.
+The letter
+.Sq r
+indicates open for reading;
+the letter
+.Sq w
+indicates open for writing.
+This field is useful when trying to find the processes that are
+preventing a file system from being downgraded to read-only.
.It Li SZ\&|DV
If the file is not a character or block special file, prints the size of
the file in bytes.
@@ -165,16 +175,6 @@ If that cannot be located, or the
.Fl n
flag is specified, prints the major/minor device
number that the special device refers to.
-.It Li R/W
-This column describes the access mode that the file allows.
-The letter
-.Sq r
-indicates open for reading;
-the letter
-.Sq w
-indicates open for writing.
-This field is useful when trying to find the processes that are
-preventing a file system from being downgraded to read-only.
.It Li NAME
If filename arguments are specified and the
.Fl f
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 473b6f901f8..a7800f39853 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstat.c,v 1.59 2007/09/02 15:19:32 deraadt Exp $ */
+/* $OpenBSD: fstat.c,v 1.60 2007/10/01 22:06:02 sobrado Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$OpenBSD: fstat.c,v 1.59 2007/09/02 15:19:32 deraadt Exp $";
+static char *rcsid = "$OpenBSD: fstat.c,v 1.60 2007/10/01 22:06:02 sobrado Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -183,7 +183,7 @@ main(int argc, char *argv[])
nlistf = memf = NULL;
oflg = 0;
while ((ch = getopt(argc, argv, "fnop:su:vN:M:")) != -1)
- switch((char)ch) {
+ switch ((char)ch) {
case 'f':
fsflg = 1;
break;
@@ -266,10 +266,10 @@ main(int argc, char *argv[])
errx(1, "%s", kvm_geterr(kd));
if (nflg)
printf("%s",
-"USER CMD PID FD DEV INUM MODE R/W DV|SZ");
+"USER CMD PID FD DEV INUM MODE R/W SZ|DV");
else
printf("%s",
-"USER CMD PID FD MOUNT INUM MODE R/W DV|SZ");
+"USER CMD PID FD MOUNT INUM MODE R/W SZ|DV");
if (oflg)
printf("%s", ":OFFSET ");
if (checkfile && fsflg == 0)
@@ -291,7 +291,7 @@ pid_t Pid;
#define PREFIX(i) do { \
printf("%-8.8s %-10s %5ld", Uname, Comm, (long)Pid); \
- switch(i) { \
+ switch (i) { \
case TEXT: \
printf(" text"); \
break; \
@@ -876,7 +876,7 @@ socktrans(struct socket *sock, int i, struct file *fp)
* The idea is not to duplicate netstat, but to make available enough
* information for further analysis.
*/
- switch(dom.dom_family) {
+ switch (dom.dom_family) {
case AF_INET:
getinetproto(proto.pr_protocol);
if (proto.pr_protocol == IPPROTO_TCP) {