Add module name to kldunload
[ikiwiki.git] / docs / howtos / HowTo_Develop_Kernel_Modules.mdwn
CommitLineData
b790f880
C
1## How to code kernel modules for DF
2
3
4* Main kernel directory: /usr/src/sys/kern
5
6
7* General coding guidelines: man style
8
9### Example: Loading a module
10
11 cd /usr/src/sys/vfs/portal
12 # build module
13 make
14
15 # load module
16 kldload portal
17 # look at module footprint
18 kldstat
19
20 # alter source code
21 make clean
22 make
23 lsvfs
24
25 # unload module
287fbbcd 26 kldunload portal
b790f880
C
27 # look at module footprint
28 kldstat
29 lsvfs
30
31
32
33### Important functions
34
35* kprintf("Message, displayed in dmesg");
36
37### TODO
38How can you see the debug output of a module?
39
40How can you redirect the debug output to dmesg?
41
42Which debug output facility you should use (not dmesg?) to look at messages from a module?