summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_conf.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2006-01-12 19:15:14 +0000
committeralfred <alfred@FreeBSD.org>2006-01-12 19:15:14 +0000
commit941cdcd1a00b407ffbeea0ef9d6eae413c4dfbe3 (patch)
treebd4ec7b6d48b3a9e5eb93894d3624f980f6c5eca /sys/kern/kern_conf.c
parenta8f06e957080a331d9ecc145c6607b6288af3659 (diff)
downloadFreeBSD-src-941cdcd1a00b407ffbeea0ef9d6eae413c4dfbe3.zip
FreeBSD-src-941cdcd1a00b407ffbeea0ef9d6eae413c4dfbe3.tar.gz
Novel idea, don't print a string if it is NULL!
This protects people from loading _really_ old modules, like say from 5.x to a 6.x or 7.x system, like for instance right after an upgrade.
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r--sys/kern/kern_conf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 906893b..b44df46 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -449,7 +449,8 @@ prep_cdevsw(struct cdevsw *devsw)
if (devsw->d_version != D_VERSION_01) {
printf(
"WARNING: Device driver \"%s\" has wrong version %s\n",
- devsw->d_name, "and is disabled. Recompile KLD module.");
+ devsw->d_name == NULL ? "???" : devsw->d_name,
+ "and is disabled. Recompile KLD module.");
devsw->d_open = dead_open;
devsw->d_close = dead_close;
devsw->d_read = dead_read;
OpenPOWER on IntegriCloud