summaryrefslogtreecommitdiff
path: root/usr.sbin/pstat
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r--usr.sbin/pstat/pstat.85
-rw-r--r--usr.sbin/pstat/pstat.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/pstat/pstat.8 b/usr.sbin/pstat/pstat.8
index 7c32ddcf292..d576027b866 100644
--- a/usr.sbin/pstat/pstat.8
+++ b/usr.sbin/pstat/pstat.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pstat.8,v 1.40 2008/05/09 09:08:47 jmc Exp $
+.\" $OpenBSD: pstat.8,v 1.41 2008/10/07 02:30:02 deraadt Exp $
.\" $NetBSD: pstat.8,v 1.9.4.1 1996/06/02 09:08:17 mrg Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
@@ -30,7 +30,7 @@
.\"
.\" from: @(#)pstat.8 8.4 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: May 9 2008 $
+.Dd $Mdocdate: October 7 2008 $
.Dt PSTAT 8
.Os
.Sh NAME
@@ -104,6 +104,7 @@ The location of the vnode table entry or socket structure for this file.
.It OFFSET
The file offset (see
.Xr lseek 2 ) .
+This information is only visible to the user or superuser.
.El
.It Fl k
Use 1K-byte blocks.
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 004edf2e277..24029b1568c 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.74 2008/09/01 08:50:07 sobrado Exp $ */
+/* $OpenBSD: pstat.c,v 1.75 2008/10/07 02:30:02 deraadt Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94";
#else
-static char *rcsid = "$OpenBSD: pstat.c,v 1.74 2008/09/01 08:50:07 sobrado Exp $";
+static char *rcsid = "$OpenBSD: pstat.c,v 1.75 2008/10/07 02:30:02 deraadt Exp $";
#endif
#endif /* not lint */
@@ -1058,7 +1058,9 @@ filemode(void)
(void)printf(" %3ld", fp.f_msgcount);
(void)printf(" %0*lx", 2 * (int)sizeof(long), (long)fp.f_data);
- if (fp.f_offset < 0)
+ if (fp.f_offset == (off_t)-1)
+ (void)printf(" *\n");
+ else if (fp.f_offset < 0)
(void)printf(" %llx\n", (long long)fp.f_offset);
else
(void)printf(" %lld\n", (long long)fp.f_offset);