From d223e53f7c9f22a5b717df6956eec42bb4ab8081 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 17 Jan 1998 16:24:27 +0000 Subject: 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 . This is an intermediate step. --- usr.bin/lsvfs/lsvfs.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'usr.bin/lsvfs/lsvfs.c') 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 #include @@ -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)); } } -- cgit v1.1