diff options
author | bapt <bapt@FreeBSD.org> | 2014-01-09 15:34:23 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-01-09 15:34:23 +0000 |
commit | b6388c86a4b0ffdde30f28b37599c956b9216605 (patch) | |
tree | cdda6014fc567aa25819842d9205d0c3e82e2a2b /sbin | |
parent | b66c9c2304022dcf75271d4958c94a9de49b9d42 (diff) | |
download | FreeBSD-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.c | 10 |
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) |