0

Loading a kernel module is not an issue.

kldload ./stepper.ko

However, when I try to unload it I get this:

kldunload -f stepper.ko
kldunload: can't unload file: Operation not supported

Doesn't work the -i or -n options, either. I'm running FreeBSD 11.0-RELEASE-p9 in VMware Workstation. Am I doing something wrong?

aaronvan
  • 316
  • 1
  • 3
  • 9

2 Answers2

0

Does your modevent function handle MOD_UNLOAD?

  • Yes. Here is a snippet: `case MOD_LOAD: uprintf("Loading successful\n"); break; case MOD_UNLOAD: uprintf("Unloading successful\n"); break;` Unloading the KO prints the message; however, it then gives the aforementioned error message. kldstat shows that the .ko is still loaded. – aaronvan Apr 17 '17 at 18:47
  • Okay, but what's the value returned by that routine? – Edward Tomasz Napierala Apr 24 '17 at 18:24
0

My VM crashed and I installed a new one. The kernel module no loads just fine. Both VMs were identical so not sure why the first would not load.

aaronvan
  • 316
  • 1
  • 3
  • 9