From owner-cvs-src@FreeBSD.ORG Thu Sep 9 20:47:28 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B785916A4CE; Thu, 9 Sep 2004 20:47:28 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95C4943D1D; Thu, 9 Sep 2004 20:47:28 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i89KlSw4025686; Thu, 9 Sep 2004 20:47:28 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i89KlSV9025685; Thu, 9 Sep 2004 20:47:28 GMT (envelope-from imp) Message-Id: <200409092047.i89KlSV9025685@repoman.freebsd.org> From: Warner Losh Date: Thu, 9 Sep 2004 20:47:28 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/usb usb_subr.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 20:47:28 -0000 imp 2004-09-09 20:47:28 UTC FreeBSD src repository Modified files: sys/dev/usb usb_subr.c Log: Add comments about why we're freeing subdevs (which is completely redundant at this point and should be retired). Don't free subdevs if we don't attach any devices. This was leaving stale device_t's around. Don't touch the device if it isn't attached since the name isn't meaningful then. Switch from strncpy (properly used) to strlcpy. From a patch submitted by Peter Pentchev Revision Changes Path 1.70 +11 -8 src/sys/dev/usb/usb_subr.c