svn commit: r200322 - stable/8/sys/dev/usb/serial
Andrew Thompson
thompsa at FreeBSD.org
Wed Dec 9 14:31:46 PST 2009
Author: thompsa
Date: Wed Dec 9 22:31:45 2009
New Revision: 200322
URL: http://svn.freebsd.org/changeset/base/200322
Log:
MFC r198774
Check unit number and provide string name for consdev.
Submitted by: HPS
Modified:
stable/8/sys/dev/usb/serial/usb_serial.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- stable/8/sys/dev/usb/serial/usb_serial.c Wed Dec 9 22:28:08 2009 (r200321)
+++ stable/8/sys/dev/usb/serial/usb_serial.c Wed Dec 9 22:31:45 2009 (r200322)
@@ -1300,7 +1300,12 @@ CONSOLE_DRIVER(ucom);
static void
ucom_cnprobe(struct consdev *cp)
{
- cp->cn_pri = CN_NORMAL;
+ if (ucom_cons_unit != -1)
+ cp->cn_pri = CN_NORMAL;
+ else
+ cp->cn_pri = CN_DEAD;
+
+ strlcpy(cp->cn_name, "ucom", sizeof(cp->cn_name));
}
static void
More information about the svn-src-stable
mailing list