From vasim@uddias.diaspro.com  Thu Oct 30 03:28:33 1997
Received: from uddias.diaspro.com (vasim@uddias.diaspro.com [194.84.211.1])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA03177
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 Oct 1997 03:28:19 -0800 (PST)
          (envelope-from vasim@uddias.diaspro.com)
Received: (from vasim@localhost)
	by uddias.diaspro.com (8.8.7/8.8.7) id QAA04794;
	Thu, 30 Oct 1997 16:27:53 +0500 (ES)
Message-Id: <199710301127.QAA04794@uddias.diaspro.com>
Date: Thu, 30 Oct 1997 16:27:53 +0500 (ES)
From: Vasim Valejev <vasim@uddias.diaspro.com>
Reply-To: vasim@uddias.diaspro.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: config gives bad numbers of pseudo-device to kernel
X-Send-Pr-Version: 3.2

>Number:         4892
>Category:       bin
>Synopsis:       config gives bad numbers of pseudo-device to kernel
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    joerg
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 30 03:30:01 PST 1997
>Closed-Date:    Fri Nov 7 01:22:37 MET 1997
>Last-Modified:  Fri Nov  7 01:23:14 MET 1997
>Originator:     Vasim Valejev
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
DiasPro
>Environment:

	FreeBSD 3.0-CURRENT
	config's sources from 28.10.1997

>Description:

	i have next lines in /sys/i386/conf/my_system_name :

		pseudo-device sl 16
		pseudo-device ppp 16

	after commands :

		config my_system_name
		cd ../../compile/my_system_name
		make depend
		make
		make install
		reboot

	i got system with ONE ppp-interface and ONE slip-interface :( :( :( .

>How-To-Repeat:

	try compile kernel 3.0-CURRENT with number ppp or slip-interfaces > 1 .

>Fix:

	config confuses when pseudo-device have multiple (> 1) entries in /sys/conf/files . I don't sure , but i use next fix :

*** mkheaders.c.orig	Thu Oct 30 16:18:35 1997
--- mkheaders.c	Thu Oct 30 16:07:48 1997
***************
*** 94,98 ****
  	for (hicount = count = 0, dp = dtab; dp != 0; dp = dp->d_next)
  		if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
! 			if (dp->d_type == PSEUDO_DEVICE) {
  				count =
  				    dp->d_slave != UNKNOWN ? dp->d_slave : 1;
--- 94,98 ----
  	for (hicount = count = 0, dp = dtab; dp != 0; dp = dp->d_next)
  		if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
! 			if (dp->d_type & PSEUDO_DEVICE) {
  				count =
  				    dp->d_slave != UNKNOWN ? dp->d_slave : 1;

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->joerg 
Responsible-Changed-By: joerg 
Responsible-Changed-When: Mon Nov 3 08:19:30 MET 1997 
Responsible-Changed-Why:  
I'm afraid i have broken this, sorry.  Will apply your fix ASAP, after a 
little testing. 

From: Vasim Valejev <vasim@diaspro.com>
To: freebsd-bugs@freebsd.org
Cc:  Subject: Re: bin/4892: config gives bad numbers of pseudo-device to kernel
Date: Thu, 30 Oct 1997 17:00:22 +0500 (ES)

 Hi !
 
 On Thu, 30 Oct 1997, Vasim Valejev wrote:
 
 > 
 > >Number:         4892
 > >Category:       bin
 > >Synopsis:       config gives bad numbers of pseudo-device to kernel
 > >Confidential:   no
 > >Severity:       critical
 > >Priority:       high
 > >Responsible:    freebsd-bugs
 
 [skip]
 
 Sorry , it's bad fix . Rigth fix for this problem :
 
 *** mkheaders.c.orig	Thu Oct 30 16:18:35 1997
 --- mkheaders.c	Thu Oct 30 16:41:03 1997
 ***************
 *** 94,98 ****
   	for (hicount = count = 0, dp = dtab; dp != 0; dp = dp->d_next)
   		if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
 ! 			if (dp->d_type == PSEUDO_DEVICE) {
   				count =
   				    dp->d_slave != UNKNOWN ? dp->d_slave : 1;
 --- 94,98 ----
   	for (hicount = count = 0, dp = dtab; dp != 0; dp = dp->d_next)
   		if (dp->d_unit != -1 && eq(dp->d_name, dev)) {
 ! 			if ((dp->d_type & TYPEMASK) == PSEUDO_DEVICE) {
   				count =
   				    dp->d_slave != UNKNOWN ? dp->d_slave : 1;
 
 Vasim V. (2:5011/27 http://members.tripod.com/~Vasim VV86-RIPE)
 
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Fri Nov 7 01:22:37 MET 1997 
State-Changed-Why:  

Suggested fix applied in rev 1.8 of mkheaders.c, thanks! 
>Unformatted:
