Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102775791
D37873.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
645 B
Referenced Files
None
Subscribers
None
D37873.diff
View Options
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1719,11 +1719,19 @@
}
}
- /*
- * Try to load the module. But ignore failures, because ifconfig can't
- * infer the names of all drivers (eg mlx4en(4)).
- */
- (void) kldload(ifkind);
+ /* Try to load the module. */
+ if (kldload(ifkind) < 0) {
+ switch (errno) {
+ case ENOENT:
+ /*
+ * Ignore ENOENT, because ifconfig can't infer the
+ * names of all drivers (eg mlx4en(4)).
+ */
+ break;
+ default:
+ err(1, "kldload(%s)", ifkind);
+ }
+ }
}
static struct cmd basic_cmds[] = {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 12:39 AM (22 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14687670
Default Alt Text
D37873.diff (645 B)
Attached To
Mode
D37873: ifconfig: abort if loading a module fails other than for ENOENT
Attached
Detach File
Event Timeline
Log In to Comment