summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-03-16 18:37:47 +0000
committerwollman <wollman@FreeBSD.org>1995-03-16 18:37:47 +0000
commit0c139f325ad73535b37a9f7140d3ae8b2a6370c4 (patch)
treef32ea043b5db80e8d2c28696dc8566af9452c9c6 /usr.bin
parent27511388bbecafdc30d39a6a64bbd27849f079e4 (diff)
downloadFreeBSD-src-0c139f325ad73535b37a9f7140d3ae8b2a6370c4.zip
FreeBSD-src-0c139f325ad73535b37a9f7140d3ae8b2a6370c4.tar.gz
Print out flags as text rather than a number.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/lsvfs/lsvfs.18
-rw-r--r--usr.bin/lsvfs/lsvfs.c18
2 files changed, 19 insertions, 7 deletions
diff --git a/usr.bin/lsvfs/lsvfs.1 b/usr.bin/lsvfs/lsvfs.1
index 03a1139..35ac03b 100644
--- a/usr.bin/lsvfs/lsvfs.1
+++ b/usr.bin/lsvfs/lsvfs.1
@@ -1,8 +1,8 @@
-.\" $Id$
+.\" $Id: lsvfs.1,v 1.1 1994/09/22 01:25:56 wollman Exp $
.\" Garrett A. Wollman, September 1994
.\" This file is in the public domain.
.\"
-.Dd September 21, 1994
+.Dd March 16, 1995
.Dt LSVFS 1
.Os
.Sh NAME
@@ -40,7 +40,9 @@ parameter to
the number of references to this VFS; i.e., the number of currently
mounted filesystems of this type
.It Flags
-flag bits (none are currently defined).
+flag bits (only
+.Dq static
+is currently defined).
.El
.Sh SEE ALSO
.Xr mount 2 ,
diff --git a/usr.bin/lsvfs/lsvfs.c b/usr.bin/lsvfs/lsvfs.c
index db33bfb..7ac562a 100644
--- a/usr.bin/lsvfs/lsvfs.c
+++ b/usr.bin/lsvfs/lsvfs.c
@@ -2,6 +2,8 @@
* lsvfs - lsit loaded VFSes
* Garrett A. Wollman, September 1994
* This file is in the public domain.
+ *
+ * $Id$
*/
#include <sys/types.h>
@@ -10,9 +12,11 @@
#include <stdio.h>
#include <err.h>
-#define FMT "%-32.32s %5d %5d %5d\n"
-#define HDRFMT "%-32.32s %5.5s %5.5s %5.5s\n"
-#define DASHES "-------------------------------- ----- ----- -----\n"
+#define FMT "%-32.32s %5d %5d %s\n"
+#define HDRFMT "%-32.32s %5.5s %5.5s %s\n"
+#define DASHES "-------------------------------- ----- ----- ---------------\n"
+
+static const char *fmt_flags(int);
int
main(int argc, char **argv)
@@ -31,7 +35,7 @@ main(int argc, char **argv)
vfc = getvfsbyname(*argv);
if(vfc) {
printf(FMT, vfc->vfc_name, vfc->vfc_index, vfc->vfc_refcount,
- vfc->vfc_flags);
+ fmt_flags(vfc->vfc_flags));
} else {
warnx("VFS %s unknown or not loaded", *argv);
rv++;
@@ -48,3 +52,9 @@ main(int argc, char **argv)
return rv;
}
+static const char *
+fmt_flags(int flags)
+{
+ return (flags & VFCF_STATIC) ? "static" : "";
+}
+
OpenPOWER on IntegriCloud