Update to compile under Lite2
This commit is contained in:
parent
c06fe0a05e
commit
b94d6bf4d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23679
@ -7,6 +7,7 @@ MLINKS= mount_std.8 mount_devfs.8 mount_std.8 mount_fdesc.8 \
|
||||
mount_std.8 mount_kernfs.8 mount_std.8 mount_procfs.8
|
||||
|
||||
MOUNT= ${.CURDIR}/../mount
|
||||
CFLAGS+= -D_NEW_VFSCONF
|
||||
CFLAGS+= -I${MOUNT}
|
||||
.PATH: ${MOUNT}
|
||||
|
||||
|
@ -43,7 +43,7 @@ char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id$";
|
||||
"$Id: mount_std.c,v 1.5 1997/02/22 14:32:59 peter Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -72,7 +72,8 @@ main(argc, argv)
|
||||
char *argv[];
|
||||
{
|
||||
int ch, mntflags;
|
||||
struct vfsconf *vfc;
|
||||
struct vfsconf vfc;
|
||||
int error;
|
||||
|
||||
/*
|
||||
* XXX
|
||||
@ -106,18 +107,17 @@ main(argc, argv)
|
||||
if (argc != 2)
|
||||
usage();
|
||||
|
||||
vfc = getvfsbyname(fsname);
|
||||
if(!vfc && vfsisloadable(fsname)) {
|
||||
if(vfsload(fsname)) {
|
||||
error = getvfsbyname(fsname, &vfc);
|
||||
if (error && vfsisloadable(fsname)) {
|
||||
if(vfsload(fsname))
|
||||
err(EX_OSERR, "vfsload(%s)", fsname);
|
||||
}
|
||||
endvfsent();
|
||||
vfc = getvfsbyname(fsname);
|
||||
error = getvfsbyname(fsname, &vfc);
|
||||
}
|
||||
if (!vfc)
|
||||
if (error)
|
||||
errx(EX_OSERR, "%s filesystem not available", fsname);
|
||||
|
||||
if (mount(vfc->vfc_index, argv[1], mntflags, NULL))
|
||||
if (mount(vfc.vfc_name, argv[1], mntflags, NULL))
|
||||
err(EX_OSERR, NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user