Date: Fri, 1 Jul 2022 15:28:02 GMT From: Juraj Lutter <otis@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 43a212b5bdee - stable/12 - kldload: Bring functionality in line with manual page Message-ID: <202207011528.261FS2cI099757@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by otis (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=43a212b5bdeee503024cc9402c7fc74c2ead0777 commit 43a212b5bdeee503024cc9402c7fc74c2ead0777 Author: Juraj Lutter <otis@FreeBSD.org> AuthorDate: 2022-06-17 13:36:53 +0000 Commit: Juraj Lutter <otis@FreeBSD.org> CommitDate: 2022-07-01 15:26:18 +0000 kldload: Bring functionality in line with manual page Honor -q parameter and do not display any warning messages when -q is specified. Approved by: dfr MFC after: 2 weeks Sponsored by: Resulta, s.r.o. Differential Revision: https://reviews.freebsd.org/D35511 (cherry picked from commit ad0a7ea65084e997f21fdb4724120e850b20659b) --- sbin/kldload/kldload.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c index 254a409cd2a7..a8e43fdd1f92 100644 --- a/sbin/kldload/kldload.c +++ b/sbin/kldload/kldload.c @@ -171,21 +171,23 @@ main(int argc, char** argv) printf("%s is already " "loaded\n", argv[0]); } else { - switch (errno) { - case EEXIST: - warnx("can't load %s: module " - "already loaded or " - "in kernel", argv[0]); - break; - case ENOEXEC: - warnx("an error occurred while " - "loading module %s. " - "Please check dmesg(8) for " - "more details.", argv[0]); - break; - default: - warn("can't load %s", argv[0]); - break; + if (!quiet) { + switch (errno) { + case EEXIST: + warnx("can't load %s: module " + "already loaded or " + "in kernel", argv[0]); + break; + case ENOEXEC: + warnx("an error occurred while " + "loading module %s. " + "Please check dmesg(8) for " + "more details.", argv[0]); + break; + default: + warn("can't load %s", argv[0]); + break; + } } errors++; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207011528.261FS2cI099757>