aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-04-05 06:30:12 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-04-05 06:30:12 +0000
commit769ae4addbf6858819cbd29266fea18785c822a4 (patch)
tree25a4cbdc3cffc7f77efd545843baeabf71c97970 /sbin
parent256e5d49b40982fc0ec2b4db8b691698dd6daaa9 (diff)
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ccdconfig/ccdconfig.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c
index ed91a6dae0ecc..e27ada40eb619 100644
--- a/sbin/ccdconfig/ccdconfig.c
+++ b/sbin/ccdconfig/ccdconfig.c
@@ -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: