Unbreak ifconfig for mlx4en(4) after r317755

ifconfig doesn't correctly infer mlx interfaces' module names, so it will
attempt to load the mlx(4) module even when not necessary.

Reported by:	rstone
MFC after:	3 weeks
X-MFC-With:	317755
Sponsored by:	Spectra Logic Corp
This commit is contained in:
Alan Somers 2017-05-03 19:53:01 +00:00
parent 9ac9bc28bb
commit f24faa98dc

View file

@ -1374,9 +1374,11 @@ ifmaybeload(const char *name)
}
}
/* not present, we should try to load it */
if (kldload(ifkind) < 0)
err(1, "kldload(%s)", ifkind);
/*
* Try to load the module. But ignore failures, because ifconfig can't
* infer the names of all drivers (eg mlx4en(4)).
*/
(void) kldload(ifkind);
}
static struct cmd basic_cmds[] = {