mirror of
https://github.com/opnsense/src.git
synced 2026-06-05 06:42:56 -04:00
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
This commit is contained in:
parent
a0d53e0b38
commit
10c916252f
1 changed files with 12 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue