kldload("ccd") if the ccd module isn't present.
This commit is contained in:
parent
256e5d49b4
commit
769ae4addb
@ -34,7 +34,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: ccdconfig.c,v 1.9 1998/06/04 06:41:26 charnier Exp $";
|
||||
"$Id: ccdconfig.c,v 1.10 1998/09/15 08:15:22 gibbs Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -42,6 +42,7 @@ static const char rcsid[] =
|
||||
#include <sys/device.h>
|
||||
#include <sys/disk.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/module.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
@ -170,6 +171,12 @@ main(argc, argv)
|
||||
setgid(getgid());
|
||||
}
|
||||
|
||||
if (modfind("ccd") < 0) {
|
||||
/* Not present in kernel, try loading it */
|
||||
if (kldload("ccd") < 0 || modfind("ccd") < 0)
|
||||
warn("ccd module not available!");
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case CCD_CONFIG:
|
||||
case CCD_UNCONFIG:
|
||||
|
Loading…
x
Reference in New Issue
Block a user