From 46b6a514f4de53a5ae1a61be419d3e14534f3ab4 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 19 Jul 2009 12:56:20 +0000 Subject: Hook up "text" (executable) output and implement for fuser too. Man page bits adapted from FreeBSD. OK miod@ --- usr.bin/fstat/fuser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr.bin/fstat/fuser.c') 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 @@ -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) -- cgit v1.2.3