On Saturday 31 October 2009 15:53:53 Dimitry Andric wrote: > On 2009-10-31 14:14, Dimitry Andric wrote: > > Somewhere between r198312 and r198702 I started getting this message > > during boot, on a machine using serial console: > > > > WARNING: console at 0xc093cea0 has no name > > Okay, this seems to be caused by r198655, which is an MFC of r197570, > where experimental support for USB serial console was added. > > However, the consdev::cn_name field is never initialized in > usb_serial.c, whereas this does happen in other console drivers. > > There doesn't seem to be a consensus whether this field needs to be > initialized in the _cnprobe() or _cninit() functions: I count 9 instances > of initialization in the former, and 3 in the latter. Is there a > preferred way? > > Since _cnprobe seems more popular, I propose the following fix: > > Index: sys/dev/usb/serial/usb_serial.c > =================================================================== > --- sys/dev/usb/serial/usb_serial.c (revision 198702) > +++ sys/dev/usb/serial/usb_serial.c (working copy) > @@ -1301,6 +1301,7 @@ static void > ucom_cnprobe(struct consdev *cp) > { > cp->cn_pri = CN_NORMAL; > + strlcpy(cp->cn_name, "ucom", sizeof cp->cn_name); > } > > static void
Patch looks fine by me. --HPS _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"