diff options
author | peter <peter@FreeBSD.org> | 1999-04-05 06:30:12 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-04-05 06:30:12 +0000 |
commit | 3f37320ea5cf2ca975974705e30c2a03c73e0808 (patch) | |
tree | 176f30a99981fb4f97316e5e368a80e23eed0bbf /sbin/ccdconfig | |
parent | c33391678f3d59265daeef12c989f1f25917e8bb (diff) | |
download | FreeBSD-src-3f37320ea5cf2ca975974705e30c2a03c73e0808.zip FreeBSD-src-3f37320ea5cf2ca975974705e30c2a03c73e0808.tar.gz |
kldload("ccd") if the ccd module isn't present.
Diffstat (limited to 'sbin/ccdconfig')
-rw-r--r-- | sbin/ccdconfig/ccdconfig.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c index ed91a6d..e27ada4 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: |