summaryrefslogtreecommitdiff
path: root/sbin/kldload
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
commit3b8f08459569bf0faa21473e5cec2491e95c9349 (patch)
tree80f45dd81ca716bcd7ca9674581e1fc40b93cd34 /sbin/kldload
parent9d2ab4a62d6733c45958627ac113bdbd818d1e2a (diff)
parentb2ba55951383498f252746f618d513139da06e8e (diff)
downloadsrc-test2-3b8f08459569bf0faa21473e5cec2491e95c9349.tar.gz
src-test2-3b8f08459569bf0faa21473e5cec2491e95c9349.zip
Notes
Diffstat (limited to 'sbin/kldload')
-rw-r--r--sbin/kldload/kldload.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c
index 84589eb49b12..3891f3328942 100644
--- a/sbin/kldload/kldload.c
+++ b/sbin/kldload/kldload.c
@@ -181,7 +181,22 @@ main(int argc, char** argv)
printf("%s is already "
"loaded\n", argv[0]);
} else {
- warn("can't load %s", argv[0]);
+ switch (errno) {
+ case EEXIST:
+ warnx("can't load %s: module "
+ "already loaded or "
+ "in kernel", argv[0]);
+ break;
+ case ENOEXEC:
+ warnx("an error occurred while "
+ "loading the module. "
+ "Please check dmesg(8) for "
+ "more details.");
+ break;
+ default:
+ warn("can't load %s", argv[0]);
+ break;
+ }
errors++;
}
} else {