aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-01-17 16:24:27 +0000
committerBruce Evans <bde@FreeBSD.org>1998-01-17 16:24:27 +0000
commit10abc80013daa7acb4aa8fe1f63731648f50ab54 (patch)
tree13dde114006ceb0e7920bd14c1ddda8a4db32a08
parentccb8bfa988f3ff3f2d6c55b5d2861e4d081e0234 (diff)
downloadsrc-10abc80013daa7acb4aa8fe1f63731648f50ab54.tar.gz
src-10abc80013daa7acb4aa8fe1f63731648f50ab54.zip
Notes
-rw-r--r--usr.bin/lsvfs/lsvfs.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/lsvfs/lsvfs.c b/usr.bin/lsvfs/lsvfs.c
index 357e8bc51512..1b2ad9a42440 100644
--- a/usr.bin/lsvfs/lsvfs.c
+++ b/usr.bin/lsvfs/lsvfs.c
@@ -3,9 +3,11 @@
* Garrett A. Wollman, September 1994
* This file is in the public domain.
*
- * $Id: lsvfs.c,v 1.8 1997/03/03 17:21:57 bde Exp $
+ * $Id: lsvfs.c,v 1.9 1997/07/23 06:48:01 charnier Exp $
*/
+#define _NEW_VFSCONF
+
#include <sys/param.h>
#include <sys/mount.h>
@@ -23,7 +25,8 @@ int
main(int argc, char **argv)
{
int rv = 0;
- struct vfsconf *vfc;
+ struct vfsconf vfc;
+ struct ovfsconf *ovfcp;
argc--, argv++;
setvfsent(1);
@@ -33,19 +36,18 @@ main(int argc, char **argv)
if(argc) {
for(; argc; argc--, argv++) {
- vfc = getvfsbyname(*argv);
- if(vfc) {
- printf(FMT, vfc->vfc_name, vfc->vfc_index, vfc->vfc_refcount,
- fmt_flags(vfc->vfc_flags));
+ if (getvfsbyname(*argv, &vfc) != 0) {
+ printf(FMT, vfc.vfc_name, vfc.vfc_typenum, vfc.vfc_refcount,
+ fmt_flags(vfc.vfc_flags));
} else {
warnx("VFS %s unknown or not loaded", *argv);
rv++;
}
}
} else {
- while(vfc = getvfsent()) {
- printf(FMT, vfc->vfc_name, vfc->vfc_index, vfc->vfc_refcount,
- fmt_flags(vfc->vfc_flags));
+ while (ovfcp = getvfsent()) {
+ printf(FMT, ovfcp->vfc_name, ovfcp->vfc_index, ovfcp->vfc_refcount,
+ fmt_flags(ovfcp->vfc_flags));
}
}