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:
parent
a8f06e9570
commit
941cdcd1a0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user