diff options
author | phk <phk@FreeBSD.org> | 2004-07-15 08:26:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-07-15 08:26:07 +0000 |
commit | 5c95d686a13bd79feeadb1a577394bf79788b6a0 (patch) | |
tree | b1c0d2c6025d7b13a90af9a64c92d523b5997072 /sys/cam | |
parent | a2ba9d448dddaf9ca08b0de9a03349bb8c0dffe6 (diff) | |
download | FreeBSD-src-5c95d686a13bd79feeadb1a577394bf79788b6a0.zip FreeBSD-src-5c95d686a13bd79feeadb1a577394bf79788b6a0.tar.gz |
Do a pass over all modules in the kernel and make them return EOPNOTSUPP
for unknown events.
A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_periph.h | 2 | ||||
-rw-r--r-- | sys/cam/cam_xpt.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h index 9f27180..88a709d 100644 --- a/sys/cam/cam_periph.h +++ b/sys/cam/cam_periph.h @@ -53,6 +53,8 @@ void periphdriver_register(void *); case MOD_UNLOAD: \ printf(#name " module unload - not possible for this module type\n"); \ return EINVAL; \ + default: \ + return EOPNOTSUPP; \ } \ return 0; \ } \ diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 592809f..19116a1 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1348,6 +1348,8 @@ cam_module_event_handler(module_t mod, int what, void *arg) xpt_init(NULL); } else if (what == MOD_UNLOAD) { return EBUSY; + } else { + return EOPNOTSUPP; } return 0; |