diff options
author | ed <ed@FreeBSD.org> | 2009-04-15 20:43:12 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-04-15 20:43:12 +0000 |
commit | 244e1ecdbf127b84af5c442ffecd0a9025532acc (patch) | |
tree | 5baa2fc9b8b804d13f16e064ebabca3d142ebc4f /sys/kern/kern_conf.c | |
parent | 52b9562b83c993486f736eba2cbcf03ad65fbcec (diff) | |
download | FreeBSD-src-244e1ecdbf127b84af5c442ffecd0a9025532acc.zip FreeBSD-src-244e1ecdbf127b84af5c442ffecd0a9025532acc.tar.gz |
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
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r-- | sys/kern/kern_conf.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 7343daa..61488e9 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -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); } |