Subject: Re: HEADS UP: Merge the gehenna-devsw branch.
To: None <bishop@rr.iij4u.or.jp>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-cats
Date: 09/15/2002 21:14:06
In article <20020906.224513.68555227.bishop@rr.iij4u.or.jp>
bishop@rr.iij4u.or.jp wrote:

> I have merged the gehenna-devsw branch into the trunk.

I've updated my CATS' kernel to 1.6H, and it no longer
recognizes boot device.

It seems that devsw_name2blk() (which is called from
cats/autoconf.c:get_device()) copies wrong strings into
devname arg for the device name. Is the attached patch correct?
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp

Index: kern/subr_devsw.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/subr_devsw.c,v
retrieving revision 1.3
diff -u -r1.3 subr_devsw.c
--- kern/subr_devsw.c	2002/09/11 16:33:03	1.3
+++ kern/subr_devsw.c	2002/09/15 11:59:08
@@ -393,7 +393,7 @@
 			if (strlen(conv->d_name) >= devnamelen)
 				printf("devsw_name2blk: too short buffer");
 #endif /* DEVSW_DEBUG */
-			strncpy(devname, name, devnamelen);
+			strncpy(devname, conv->d_name, devnamelen);
 			devname[devnamelen - 1] = '\0';
 		}
 		return (bmajor);