I have a simple kernel extension:
kern_return_t HelloWorld_start (kmod_info_t *ki, void * d) {
printf("Hello World\n");
return KERN_SUCCESS;
}
kern_return_t HelloWorld_stop (kmod_info_t * kid, void * d) {
printf("Goodbye World\n");
return KERN_SUCCESS;
}
Which I'm compiling and loading via:
sudo kextload HelloWorld.kext
And it appears in the kextstat listing:
...
129 0 0xffffff7f80fac000 0x4000 0x4000 com.apple.driver.AppleProfileThreadInfoAction (85.2) <123 6 4 3 1>
130 0 0xffffff7f80fb0000 0x4000 0x4000 com.apple.driver.AppleProfileTimestampAction (85.2) <123 5 4 3 1>
132 0 0xffffff7f807c6000 0x2000 0x2000 sk-r-d.HelloWorld (1) <4>
However, I have nothing in kernel.log (or system.log) - I should be seeing my printf() statements. Any idea why?