From 1758bf79ff52b23e5828e97e6ed62be161d761bf Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 29 Nov 1995 12:38:49 +0000 Subject: #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.. --- sys/kern/kern_conf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/kern/kern_conf.c') 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 #include #include #include -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; \ -- cgit v1.1