Add support for LIBSA_SINGLE_DEVICE and LIBSA_SINGLE_FILESYSTEM.
This commit is contained in:
parent
6db650781c
commit
971284a4ed
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: conf.c,v 1.12 1999/03/31 07:43:39 simonb Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.13 1999/04/01 05:52:38 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -46,6 +46,7 @@
|
|||
|
||||
const struct callback *callv = &callvec;
|
||||
|
||||
#ifndef LIBSA_SINGLE_DEVICE
|
||||
#ifdef SMALL
|
||||
#define rzclose /*(()(struct open_file*))*/0
|
||||
#define rzioctl /*(()(struct open_file*, u_long, void*))*/0
|
||||
|
@ -58,7 +59,10 @@ struct devsw devsw[] = {
|
|||
};
|
||||
|
||||
int ndevs = (sizeof(devsw)/sizeof(devsw[0]));
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LIBSA_SINGLE_FILESYSTEM
|
||||
#ifdef LIBSA_NO_FS_CLOSE
|
||||
#define ufs_close 0
|
||||
#endif
|
||||
|
@ -71,3 +75,4 @@ struct fs_ops file_system[] = {
|
|||
};
|
||||
|
||||
int nfsys = sizeof(file_system)/sizeof(struct fs_ops);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: devopen.c,v 1.9 1999/02/22 08:24:47 simonb Exp $ */
|
||||
/* $NetBSD: devopen.c,v 1.10 1999/04/01 05:52:39 simonb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -127,6 +127,9 @@ devopen(f, fname, file)
|
|||
}
|
||||
*ncp = '\0';
|
||||
|
||||
#ifdef LIBSA_SINGLE_DEVICE
|
||||
rc = DEV_OPEN(dp)(f, ctlr, unit, part);
|
||||
#else
|
||||
#ifdef SMALL
|
||||
if (strcmp (namebuf, "rz")) {
|
||||
printf ("Unknown device: %s\n", namebuf);
|
||||
|
@ -148,10 +151,13 @@ devopen(f, fname, file)
|
|||
fnd:
|
||||
#endif
|
||||
rc = (dp->dv_open)(f, ctlr, unit, part);
|
||||
#endif
|
||||
if (rc)
|
||||
return (rc);
|
||||
|
||||
#ifndef LIBSA_SINGLE_DEVICE
|
||||
f->f_dev = dp;
|
||||
#endif
|
||||
if (file && *cp != '\0')
|
||||
*file = (char *)cp; /* XXX */
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue