svn commit: r198774 - head/sys/dev/usb/serial
Andrew Thompson
thompsa at FreeBSD.org
Sun Nov 1 21:41:44 UTC 2009
Author: thompsa
Date: Sun Nov 1 21:41:44 2009
New Revision: 198774
URL: http://svn.freebsd.org/changeset/base/198774
Log:
Check unit number and provide string name for consdev.
Submitted by: HPS
Modified:
head/sys/dev/usb/serial/usb_serial.c
Modified: head/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- head/sys/dev/usb/serial/usb_serial.c Sun Nov 1 20:24:17 2009 (r198773)
+++ head/sys/dev/usb/serial/usb_serial.c Sun Nov 1 21:41:44 2009 (r198774)
@@ -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-head
mailing list