diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2009-07-19 12:56:20 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2009-07-19 12:56:20 +0000 |
commit | 46b6a514f4de53a5ae1a61be419d3e14534f3ab4 (patch) | |
tree | 2da28c5a6cd333d21d407764354fb6b68dac049a /usr.bin/fstat/fuser.c | |
parent | a6eb7b3bc0342e3540566537ce60fa5d2fca5de4 (diff) |
Hook up "text" (executable) output and implement for fuser too.
Man page bits adapted from FreeBSD. OK miod@
Diffstat (limited to 'usr.bin/fstat/fuser.c')
-rw-r--r-- | usr.bin/fstat/fuser.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/fstat/fuser.c b/usr.bin/fstat/fuser.c index 3f146373d72..8486d33ac89 100644 --- a/usr.bin/fstat/fuser.c +++ b/usr.bin/fstat/fuser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuser.c,v 1.1 2009/07/08 16:04:00 millert Exp $ */ +/* $OpenBSD: fuser.c,v 1.2 2009/07/19 12:56:19 millert Exp $ */ /* * Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com> @@ -114,8 +114,10 @@ fuser_check(struct kinfo_file2 *kf) case KERN_FILE_RDIR: fu->flags |= F_ROOT; break; - case KERN_FILE_TRACE: case KERN_FILE_TEXT: + fu->flags |= F_TEXT; + break; + case KERN_FILE_TRACE: /* ignore */ break; default: @@ -142,6 +144,9 @@ printfu(struct fuser *fu) if (fu->flags & F_ROOT) fprintf(stderr, "r"); + if (fu->flags & F_TEXT) + fprintf(stderr, "t"); + if (uflg) { pwd = getpwuid(fu->uid); if (pwd != NULL) |