diff --git a/share/examples/kld/cdev/module/cdevmod.c b/share/examples/kld/cdev/module/cdevmod.c index 0f6f3cbdbb17..7b9a4531cff0 100644 --- a/share/examples/kld/cdev/module/cdevmod.c +++ b/share/examples/kld/cdev/module/cdevmod.c @@ -134,7 +134,7 @@ cdev_load(module_t mod, int cmd, void *arg) break; /* Success*/ default: /* we only understand load/unload*/ - err = EINVAL; + err = EOPNOTSUPP; break; } diff --git a/share/examples/kld/dyn_sysctl/dyn_sysctl.c b/share/examples/kld/dyn_sysctl/dyn_sysctl.c index 628dbf387a6d..bcef7d472c5e 100644 --- a/share/examples/kld/dyn_sysctl/dyn_sysctl.c +++ b/share/examples/kld/dyn_sysctl/dyn_sysctl.c @@ -153,7 +153,7 @@ load (module_t mod, int cmd, void *arg) printf("Ok\n"); break; default : - error = EINVAL; + error = EOPNOTSUPP; break; } return error; diff --git a/share/examples/kld/syscall/module/syscall.c b/share/examples/kld/syscall/module/syscall.c index eb168c3c5713..f65668b3a907 100644 --- a/share/examples/kld/syscall/module/syscall.c +++ b/share/examples/kld/syscall/module/syscall.c @@ -77,7 +77,7 @@ load (struct module *module, int cmd, void *arg) printf ("syscall unloaded from %d\n", offset); break; default : - error = EINVAL; + error = EOPNOTSUPP; break; } return error;