summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-01-09 15:34:23 +0000
committerbapt <bapt@FreeBSD.org>2014-01-09 15:34:23 +0000
commitb6388c86a4b0ffdde30f28b37599c956b9216605 (patch)
treecdda6014fc567aa25819842d9205d0c3e82e2a2b /sbin
parentb66c9c2304022dcf75271d4958c94a9de49b9d42 (diff)
downloadFreeBSD-src-b6388c86a4b0ffdde30f28b37599c956b9216605.zip
FreeBSD-src-b6388c86a4b0ffdde30f28b37599c956b9216605.tar.gz
Import error message shown to the user when trying to load a module that is
already loaded or compiled withing the kernel MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r--sbin/kldload/kldload.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c
index 84589eb..dfde1f4 100644
--- a/sbin/kldload/kldload.c
+++ b/sbin/kldload/kldload.c
@@ -181,8 +181,14 @@ main(int argc, char** argv)
printf("%s is already "
"loaded\n", argv[0]);
} else {
- warn("can't load %s", argv[0]);
- errors++;
+ if (errno == EEXIST) {
+ warnx("can't load %s: module "
+ "already loaded or "
+ "in kernel", argv[0]);
+ } else {
+ warn("can't load %s", argv[0]);
+ errors++;
+ }
}
} else {
if (verbose)
OpenPOWER on IntegriCloud