Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103993525
D44552.id136412.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44552.id136412.diff
View Options
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -483,7 +483,11 @@
*/
if (error != ENOENT) {
foundfile = 1;
- if (error == EEXIST)
+ /*
+ * The format is now recognized, abort trying another
+ * linker.
+ */
+ if (error == EEXIST || error == EUNSDEP)
break;
}
if (lf) {
@@ -541,7 +545,7 @@
* can recognize this special case and not post bogus
* dialog boxes.
*/
- if (error != EEXIST)
+ if (error != EEXIST && error != EUNSDEP)
error = ENOEXEC;
} else
error = ENOENT; /* Nothing found */
@@ -1244,6 +1248,8 @@
error = kern_kldload(td, pathname, &fileid);
if (error == 0)
td->td_retval[0] = fileid;
+ else if (error == EUNSDEP)
+ error = ENOEXEC;
}
free(pathname, M_TEMP);
return (error);
@@ -2355,8 +2361,33 @@
}
error = linker_load_module(NULL, modname, lf, verinfo, NULL);
if (error) {
- printf("KLD %s: depends on %s - not available or"
- " version mismatch\n", lf->filename, modname);
+ switch (error) {
+ case ENOENT:
+ printf("KLD %s: depends on %s - not available\n",
+ lf->filename, modname);
+ break;
+ case EEXIST:
+ printf("KLD %s: depends on %s - version mismatch\n",
+ lf->filename, modname);
+ break;
+ case ENOEXEC:
+ printf("KLD %s: depends on %s - file format unrecognized\n",
+ lf->filename, modname);
+ break;
+ case ENOMEM:
+ printf("KLD %s: depends on %s - no memory\n",
+ lf->filename, modname);
+ break;
+ case EUNSDEP:
+ printf("KLD %s: depends on %s - transitive dependency error\n",
+ lf->filename, modname);
+ break;
+ default:
+ printf("KLD %s: depends on %s - can not load, error %d\n",
+ lf->filename, modname, error);
+ }
+
+ error = EUNSDEP;
break;
}
}
@@ -2364,7 +2395,7 @@
if (error)
return (error);
linker_addmodules(lf, start, stop, 0);
- return (error);
+ return (0);
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 3:37 AM (18 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15000009
Default Alt Text
D44552.id136412.diff (1 KB)
Attached To
Mode
D44552: kern linker: Use EUNSDEP for unsatisfied dependencies
Attached
Detach File
Event Timeline
Log In to Comment