diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2002-10-17 17:28:57 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2002-10-17 17:28:57 +0000 |
| commit | 3b132a615f169766e1ca0d69dd3709e2cebb52c7 (patch) | |
| tree | db72b75605c44b35836a79f1bf27147e7771335d /sys/kern/kern_linker.c | |
| parent | 555b7ddc316a03d0008f8278078fb85d437532d2 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_linker.c')
| -rw-r--r-- | sys/kern/kern_linker.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 07550219cceb..b936159c91b9 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -362,10 +362,18 @@ linker_load_file(const char *filename, linker_file_t *result) * Less than ideal, but tells the user whether it failed to load or * the module was not found. */ - if (foundfile) - /* Format not recognized (or unloadable). */ - error = ENOEXEC; - else + if (foundfile) { + /* + * Format not recognized or otherwise unloadable. + * When loading a module that is statically built into + * the kernel EEXIST percolates back up as the return + * value. Preserve this so that apps like sysinstall + * can recognize this special case and not post bogus + * dialog boxes. + */ + if (error != EEXIST) + error = ENOEXEC; + } else error = ENOENT; /* Nothing found */ out: return (error); |
