DragonFly BSD

HowTo Develop Kernel Modules

How to code kernel modules for DF

Example: Loading a module

cd /usr/src/sys/vfs/portal
# build module
make

# load module
kldload portal
# look at module footprint
kldstat

# alter source code
make clean
make
lsvfs

# unload module
kldunload portal
# look at module footprint
kldstat
lsvfs

Important functions

TODO

How can you see the debug output of a module?

How can you redirect the debug output to dmesg?

Which debug output facility you should use (not dmesg?) to look at messages from a module?