mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Print out flags as text rather than a number.
This commit is contained in:
parent
cff19ac2ef
commit
f1b2407b0b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7094
|
@ -1,8 +1,8 @@
|
||||||
.\" $Id$
|
.\" $Id: lsvfs.1,v 1.1 1994/09/22 01:25:56 wollman Exp $
|
||||||
.\" Garrett A. Wollman, September 1994
|
.\" Garrett A. Wollman, September 1994
|
||||||
.\" This file is in the public domain.
|
.\" This file is in the public domain.
|
||||||
.\"
|
.\"
|
||||||
.Dd September 21, 1994
|
.Dd March 16, 1995
|
||||||
.Dt LSVFS 1
|
.Dt LSVFS 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -40,7 +40,9 @@ parameter to
|
||||||
the number of references to this VFS; i.e., the number of currently
|
the number of references to this VFS; i.e., the number of currently
|
||||||
mounted filesystems of this type
|
mounted filesystems of this type
|
||||||
.It Flags
|
.It Flags
|
||||||
flag bits (none are currently defined).
|
flag bits (only
|
||||||
|
.Dq static
|
||||||
|
is currently defined).
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr mount 2 ,
|
.Xr mount 2 ,
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
* lsvfs - lsit loaded VFSes
|
* lsvfs - lsit loaded VFSes
|
||||||
* Garrett A. Wollman, September 1994
|
* Garrett A. Wollman, September 1994
|
||||||
* This file is in the public domain.
|
* This file is in the public domain.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -10,9 +12,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
|
||||||
#define FMT "%-32.32s %5d %5d %5d\n"
|
#define FMT "%-32.32s %5d %5d %s\n"
|
||||||
#define HDRFMT "%-32.32s %5.5s %5.5s %5.5s\n"
|
#define HDRFMT "%-32.32s %5.5s %5.5s %s\n"
|
||||||
#define DASHES "-------------------------------- ----- ----- -----\n"
|
#define DASHES "-------------------------------- ----- ----- ---------------\n"
|
||||||
|
|
||||||
|
static const char *fmt_flags(int);
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
|
@ -31,7 +35,7 @@ main(int argc, char **argv)
|
||||||
vfc = getvfsbyname(*argv);
|
vfc = getvfsbyname(*argv);
|
||||||
if(vfc) {
|
if(vfc) {
|
||||||
printf(FMT, vfc->vfc_name, vfc->vfc_index, vfc->vfc_refcount,
|
printf(FMT, vfc->vfc_name, vfc->vfc_index, vfc->vfc_refcount,
|
||||||
vfc->vfc_flags);
|
fmt_flags(vfc->vfc_flags));
|
||||||
} else {
|
} else {
|
||||||
warnx("VFS %s unknown or not loaded", *argv);
|
warnx("VFS %s unknown or not loaded", *argv);
|
||||||
rv++;
|
rv++;
|
||||||
|
@ -48,3 +52,9 @@ main(int argc, char **argv)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
fmt_flags(int flags)
|
||||||
|
{
|
||||||
|
return (flags & VFCF_STATIC) ? "static" : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue