summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-06-05 21:55:57 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-06-05 21:55:57 +0000
commitc6dd496cd9571118a6f47dbebd12549148ae2906 (patch)
treec88ed11b402fc7415c53f35f29874d745f99b044 /lib/libc
parent7ad3fab81e2cbba0b8cde6bfff490aeb96779324 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/devname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/devname.c b/lib/libc/gen/devname.c
index e5cc9dfb8064..bd9ac4169923 100644
--- a/lib/libc/gen/devname.c
+++ b/lib/libc/gen/devname.c
@@ -105,10 +105,10 @@ devname(dev, type)
}
/* Finally just format it */
- if (minor(dev) > 255)
+ if (dev == NODEV)
+ r = "#NODEV";
+ else
r = "#%c:%d:0x%x";
- else
- r = "#%c:%d:0x%d";
snprintf(buf, SPECNAMELEN + 1, r,
(type & S_IFMT) == S_IFCHR ? 'C' : 'B', major(dev), minor(dev));
return (buf);