Subject: bin/386: 'config' incorrectly builds tables for pseudo-devices with multiple components
To: None <gnats-admin>
From: jason downs <downsj@CSOS.ORST.EDU>
List: netbsd-bugs
Date: 08/03/1994 03:35:10
>Number:         386
>Category:       bin
>Synopsis:       'config' incorrectly builds tables for pseudo-devices with multiple components
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug  3 03:35:06 1994
>Originator:     jason downs
>Organization:
Computer Science Outreach Services, Oregon State University
>Release:        NetBSD 1.0-ALPHA
>Environment:
	
System: NetBSD nemesis 1.0-ALPHA NetBSD 1.0-ALPHA (NEMESIS) #15: Wed Aug 3 00:06:54 PDT 1994 root@nemesis:/tmp_mnt/jadzia/info/BSD/src/sys/arch/hp300/compile/NEMESIS hp300


>Description:
	config(8) incorrectly builds ioconf.c tables for pseudo-devices
	with multiple components.  It will lose the last such component;
	for example, the ccd driver will only configure all but the last
	partition specified in the system config file.
>How-To-Repeat:
	Attempt to config a kernel with the ccd driver, and check the ioconf.c
	produced.  The entry for the ccd driver will be missing the last
	specified partition.
>Fix:
	Patch to /usr/src/usr.sbin/config/mkioconf.c:

*** mkioconf.c.orig	Wed Aug  3 03:18:37 1994
--- mkioconf.c	Wed Aug  3 03:19:42 1994
***************
*** 135,141 ****
  		fprintf(fp, "\t%d,\t%d,\t%d,\t%d,\t{",
  			dp->d_unit, dp->d_pri < 0 ? 0 : dp->d_pri,
  			dp->d_flags, 1);
! 		for (fl = fl->f_next; fl->f_type == COMPSPEC && fl->f_next; fl = fl->f_next)
  			fprintf(fp, " 0x%x,", fl->f_compdev);
  		fprintf(fp, " NODEV },\n");
  	}
--- 135,141 ----
  		fprintf(fp, "\t%d,\t%d,\t%d,\t%d,\t{",
  			dp->d_unit, dp->d_pri < 0 ? 0 : dp->d_pri,
  			dp->d_flags, 1);
! 		for (fl = fl->f_next; fl && fl->f_type == COMPSPEC; fl = fl->f_next)
  			fprintf(fp, " 0x%x,", fl->f_compdev);
  		fprintf(fp, " NODEV },\n");
  	}
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------