Commit Graph

12 Commits

Author SHA1 Message Date
christos f5b92a169e - don't if then else the same thing. print a more meaningful message
- don't leak a dictionary on failure
- minor KNF
2011-09-14 12:30:20 +00:00
mbalmer d1912e7839 Do not not look for modules in the current working directory first. This is
to prevent from accidentally loading ./module.kmod when we actually wanted to
load module from the system module area.

To load a module from a filesystem path, the module name must contain at
least on path separator character (/), to load a module from the system
module areas, the name must not contain a path separator character:

modload ./mymod.kmod      # loads mymod.kmod from the curren directory
modload mymod             # loads mymod.kmod from the system module area
2011-08-06 08:11:09 +00:00
jnemeth 22405528a4 Rename the autoloaded property list from <module>.prop to <module>.plist
as discussed on tech-kern.
2010-11-28 00:26:38 +00:00
dholland 8f6ed30d57 Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
2010-11-19 06:44:33 +00:00
jnemeth fd3014ea71 if autoloading check for a noautoload=true property and if found,
deny the autoload
2010-11-18 09:50:47 +00:00
hannken 1423e65b26 Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
2010-06-24 12:58:48 +00:00
pgoyette c77c96962b Move definition of module_load_vfs_vec from kern_module_vfs.c to
kern_module.c - keeps rump happy.

Thanks, pooka!
2010-05-24 16:37:17 +00:00
pgoyette c269eb06dd Clean up kern_module.c rev 1.66, thanks to pooka@ for review & suggestions 2010-05-24 15:34:48 +00:00
jnemeth bc239ea58a don't leak a vnode and don't call namei (implicitly) twice 2010-04-04 17:18:04 +00:00
dholland 1b722ce8d0 Don't inspect vn_stat() results until after checking that it succeeded.
If anyone's been seeing random "File too large" results from module loading,
this should fix it.
2010-02-16 05:47:52 +00:00
pooka f32c83c1bd Rename a few routines from _file() to _vfs() for consistency.
Ride 5.99.24 bump.
2010-01-19 22:17:44 +00:00
pooka a8ed404de6 * make it possible to include kern_module in a kernel without vfs
support, i.e. move vfs functionality to a separate module
  (kern_module_vfs.c)
* make module proplist size an MI constant (now 8k) instead of PAGE_SIZE
* change some error values to something else than the karmic EINVAL
2009-11-18 17:40:45 +00:00