summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial/usb_serial.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-11-01 21:41:44 +0000
committerthompsa <thompsa@FreeBSD.org>2009-11-01 21:41:44 +0000
commit48cfddd12830c899dc880b3075820f80f3a3e9be (patch)
tree2e0cfc2f39dcce7c5f0bcdba21d482022625408b /sys/dev/usb/serial/usb_serial.c
parenteda01f0a8b19382462f952661be54536508810dd (diff)
downloadFreeBSD-src-48cfddd12830c899dc880b3075820f80f3a3e9be.zip
FreeBSD-src-48cfddd12830c899dc880b3075820f80f3a3e9be.tar.gz
Check unit number and provide string name for consdev.
Submitted by: HPS
Diffstat (limited to 'sys/dev/usb/serial/usb_serial.c')
-rw-r--r--sys/dev/usb/serial/usb_serial.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c
index ca54712..871ae54 100644
--- a/sys/dev/usb/serial/usb_serial.c
+++ b/sys/dev/usb/serial/usb_serial.c
@@ -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
OpenPOWER on IntegriCloud