diff options
Diffstat (limited to 'sbin/kldload/kldload.c')
-rw-r--r-- | sbin/kldload/kldload.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c index 6e88546..02b34ce 100644 --- a/sbin/kldload/kldload.c +++ b/sbin/kldload/kldload.c @@ -181,12 +181,22 @@ main(int argc, char** argv) printf("%s is already " "loaded\n", argv[0]); } else { - if (errno == EEXIST) + switch (errno) { + case EEXIST: warnx("can't load %s: module " "already loaded or " "in kernel", argv[0]); - else + break; + case ENOEXEC: + warnx("an error occured while " + "loading the module. " + "Please check dmesg(1) for " + "more details."); + break; + default: warn("can't load %s", argv[0]); + break; + } errors++; } } else { |