Re: HEADS UP: Merge the gehenna-devsw branch.
Izumi Tsutsui <[email protected]> Sun, 15 Sep 2002 21:14:06 +0900 (JST)
| Newsgroups | gmane.os.netbsd.ports.cats,gmane.os.netbsd.current |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]> [email protected] 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 [email protected] 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);