CFR: sanity checking arguments to kldload(8)

Benno Rice benno at jeamland.net
Wed Jun 3 05:08:15 UTC 2009


On 03/06/2009, at 1:03 PM, Benno Rice wrote:

> The attached patch performs some sanity checking on arguments passed  
> to kldload(8).  Specifically, if an argument looks like a filename  
> but lacks a path (eg, 'xfs.ko' as opposed to 'xfs' or './xfs.ko') it  
> checks to see if a file with that name is in the current directory.   
> If it is, it checks the current module path to see if a file with  
> that name also exists there (possibly in an earlier entry if the  
> current directory is in the module path), if so it warns the user  
> that that module will be loaded and not the one in the current  
> directory.  If not, it tells the user how to use a path to load the  
> module.
>
> A -q option is added to quieten the output if desired.


I've had some feedback that the instructions on how to load the module  
from the current directory
should instead be in the manual page.  I've done this and added extra  
verbiage to point out the potential source of confusion wherein bare  
filenames (eg. foo.ko as opposed to ./foo.ko) will only ever be loaded  
from the module path.

Further comments appreciated.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kldload-2.diff
Type: application/octet-stream
Size: 4730 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090603/dc1cdf8c/kldload-2.obj
-------------- next part --------------



-- 
Benno Rice
benno at jeamland.net





More information about the freebsd-current mailing list