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.
This commit is contained in:
Bruce Evans 1998-01-17 16:24:27 +00:00
parent ccb8bfa988
commit 10abc80013
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32593

View File

@ -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));
}
}