Date: Mon, 13 Jan 2014 16:23:09 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260594 - head/sbin/kldload Message-ID: <201401131623.s0DGN9Cv055828@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Mon Jan 13 16:23:09 2014 New Revision: 260594 URL: http://svnweb.freebsd.org/changeset/base/260594 Log: Point the user to dmesg(1) to get informations about why loading a module did fail instead of printing the cryptic "Exec format error" MFC after: 1 week Modified: head/sbin/kldload/kldload.c Modified: head/sbin/kldload/kldload.c ============================================================================== --- head/sbin/kldload/kldload.c Mon Jan 13 16:05:18 2014 (r260593) +++ head/sbin/kldload/kldload.c Mon Jan 13 16:23:09 2014 (r260594) @@ -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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401131623.s0DGN9Cv055828>