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.
This commit is contained in:
alfred 2006-01-12 19:15:14 +00:00
parent a8f06e9570
commit 941cdcd1a0

View File

@ -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;