git: kldload(8): Warn when a module exists in current dir but not loaded
Aaron LI
aly at crater.dragonflybsd.org
Mon May 11 00:12:27 PDT 2026
commit 73e62257a788fbaaa581faa9267847ea0219dcf3
Author: Aaron LI <aly at aaronly.me>
Date: Mon May 11 15:00:52 2026 +0800
kldload(8): Warn when a module exists in current dir but not loaded
When a bare filename is specified, kldload(8) only searches it in the
paths defined by 'kern.module_path' kenv/sysctl. When the same module
exists in the current directory, it will not be loaded. This can cause
surprise and confusion.
To not change the behavior as well as keep consistent with FreeBSD, emit
a warning in this case. The FreeBSD implementation looks unnecessarily
complex, so I chose to do it in another way.
In addition, improve the verbose message to also print the actual module
path.
Sync the man page with FreeBSD's.
Summary of changes:
sbin/kldload/kldload.8 | 57 ++++++++++++++++++++++++++++++++++++++++++++------
sbin/kldload/kldload.c | 36 +++++++++++++++++++++++++------
2 files changed, 81 insertions(+), 12 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/73e62257a788fbaaa581faa9267847ea0219dcf3
--
DragonFly BSD source repository
More information about the Commits
mailing list