From owner-svn-src-all@FreeBSD.ORG Wed Apr 15 20:43:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18E5A106567B; Wed, 15 Apr 2009 20:43:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A577C8FC0A; Wed, 15 Apr 2009 20:43:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FKhCGd054081; Wed, 15 Apr 2009 20:43:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FKhCVs054080; Wed, 15 Apr 2009 20:43:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200904152043.n3FKhCVs054080@svn.freebsd.org> From: Ed Schouten Date: Wed, 15 Apr 2009 20:43:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191118 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 20:43:13 -0000 Author: ed Date: Wed Apr 15 20:43:12 2009 New Revision: 191118 URL: http://svn.freebsd.org/changeset/base/191118 Log: Remove dead code from devtoname(). In the good old days it was possible to have dev_t's that referred to nonexistent devices. In these cases devtoname() automatically generated names. This is no longer possible, so remove this dead code. Discussed with: kib Modified: head/sys/kern/kern_conf.c Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Wed Apr 15 20:34:19 2009 (r191117) +++ head/sys/kern/kern_conf.c Wed Apr 15 20:43:12 2009 (r191118) @@ -859,24 +859,7 @@ destroy_dev(struct cdev *dev) const char * devtoname(struct cdev *dev) { - char *p; - struct cdevsw *csw; - int mynor; - - if (dev->si_name[0] == '#' || dev->si_name[0] == '\0') { - p = dev->si_name; - csw = dev_refthread(dev); - if (csw != NULL) { - sprintf(p, "(%s)", csw->d_name); - dev_relthread(dev); - } - p += strlen(p); - mynor = dev2unit(dev); - if (mynor < 0 || mynor > 255) - sprintf(p, "/%#x", (u_int)mynor); - else - sprintf(p, "/%d", mynor); - } + return (dev->si_name); }