mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
pstat can hide information too; also based on PR 5113
This commit is contained in:
parent
b749a86c2c
commit
0c75dadaea
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user