summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_conf.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1995-11-29 12:38:49 +0000
committerjulian <julian@FreeBSD.org>1995-11-29 12:38:49 +0000
commit1758bf79ff52b23e5828e97e6ed62be161d761bf (patch)
treedf6dd6d66e59ff032233912a9ab538539945f4f6 /sys/kern/kern_conf.c
parente9b6a008cf513b0c36b6787afae1bf903ef945fb (diff)
downloadFreeBSD-src-1758bf79ff52b23e5828e97e6ed62be161d761bf.zip
FreeBSD-src-1758bf79ff52b23e5828e97e6ed62be161d761bf.tar.gz
#ifdef out nearly the entire file of conf.c when JREMOD is defined
add a few safety checks in specfs because now it's possible to get entries in [cd]devsw[] which are ALL NULL so it's better to discover this BEFORE jumping into the d_open() entry.. more check to come later.. this getsthe code to the stage where I can start testing it, even if I haven't caught every little error case... I guess I'll find them quick enough..
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r--sys/kern/kern_conf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 4c5f57c..fabff12 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -30,14 +30,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_conf.c,v 1.2 1995/10/02 10:15:40 julian Exp $
+ * $Id: kern_conf.c,v 1.3 1995/10/04 08:58:00 julian Exp $
*/
#include <sys/param.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/conf.h>
-extern d_open_t lkmenodev;
/*
* (re)place an entry in the bdevsw or cdevsw table
@@ -54,8 +53,8 @@ int TTYPE##_add(dev_t *descrip, \
* Search the table looking for a slot... \
*/ \
for (i = 0; i < NXXXDEV; i++) \
- if (TTYPE[i].d_open == lkmenodev) \
- break; /* found it! */ \
+ if (TTYPE[i].d_open == NULL) \
+ break; /* found one! */ \
/* out of allocable slots? */ \
if (i == NXXXDEV) { \
return ENFILE; \
OpenPOWER on IntegriCloud