summaryrefslogtreecommitdiffstats
path: root/usr.bin/lsvfs
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-01-17 16:24:27 +0000
committerbde <bde@FreeBSD.org>1998-01-17 16:24:27 +0000
commitd223e53f7c9f22a5b717df6956eec42bb4ab8081 (patch)
treeb51417c4043a161c44858f3c6eb46c7a2b0590af /usr.bin/lsvfs
parent6ac182269feb92e88a2f331e8c937b2d34a428f2 (diff)
downloadFreeBSD-src-d223e53f7c9f22a5b717df6956eec42bb4ab8081.zip
FreeBSD-src-d223e53f7c9f22a5b717df6956eec42bb4ab8081.tar.gz
Started getting rid of the compatibility cruft for the Lite1 mount()
and the pre-Lite2 vfsconf interfaces. For lsvfs, use the new interface for getvfsbyname(), and use the old interface for getvfsent() explicitly instead of depending on macro hacks in <sys/mount.h>. This is an intermediate step.
Diffstat (limited to 'usr.bin/lsvfs')
-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 357e8bc..1b2ad9a 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));
}
}
OpenPOWER on IntegriCloud