Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Dec 2009 22:31:45 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r200322 - stable/8/sys/dev/usb/serial
Message-ID:  <200912092231.nB9MVjmJ041533@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912092231.nB9MVjmJ041533>