Subject: bin/541: config(8) core dumps on ccd device declarations
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Jason Downs <downsj@CSOS.ORST.EDU>
List: netbsd-bugs
Date: 10/31/1994 05:20:05
>Number:         541
>Category:       bin
>Synopsis:       config(8) core dumps on ccd device declarations
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 31 05:20:03 1994
>Originator:     
>Organization:
Computer Science Outreach Services, Oregon State University
>Release:        1.0
>Environment:
System: NetBSD empire 1.0 NetBSD 1.0 (EMPIRE) #1: Sun Oct 30 01:38:20 PST 1994 downsj@empire:/localsrc/sys/arch/hp300/compile/EMPIRE hp300


>Description:
	The patch to config(8) to support ccd devices was originally applied
	incorrectly, and I forgot about it, until now. It is incorrect in
	the current (1.0) source tree.
>How-To-Repeat:
	Attempt to config a kernel with a ccd device.
>Fix:
	/usr/src/usr.sbin/config/mkioconf.c:

*** mkioconf.c.orig	Wed Aug  3 12:32:17 1994
--- mkioconf.c	Sat Aug  6 05:39:10 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; 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: