Date: Thu, 19 Jan 2023 07:33:32 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 269042] ifconfig list fails since 2c24ad3377a6f58 / D37873 Message-ID: <bug-269042-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269042 Bug ID: 269042 Summary: ifconfig list fails since 2c24ad3377a6f58 / D37873 Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: bugs.fbsd@paepcke.de Hello all, https://cgit.freebsd.org/src/commit/sbin/ifconfig?id=2c24ad3377a6f584e484656db8390e4eb7cfc119 https://reviews.freebsd.org/D37873 Since this commit replaced the general silent fail for any kind of kdload error with a hard (exit) fail, except for ENOENT - ifconfig fails hard (exit) even in case the user has not even the permission to launch the syscall to kldload. - /* - * 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); + } + } Was this intentional or can we add nother exception for informal msg without (hard) exit here? Thank you! Michael -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269042-227>
