Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/filemon The correct default return value from a modu...



details:   https://anonhg.NetBSD.org/src/rev/62c649098dae
branches:  trunk
changeset: 811891:62c649098dae
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Nov 21 03:34:28 2015 +0000

description:
The correct default return value from a module's xxx_modcmd() routine
is ENOTTY, not EOPNOTSUPP!  The former will allow the module to be
auto-unloaded, while the latter will prevent it.

Note that manual unloading of the filemon module is unaffected, as
that is controlled by actual usage of the module.

diffstat:

 sys/dev/filemon/filemon.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 0b11ba2d7032 -r 62c649098dae sys/dev/filemon/filemon.c
--- a/sys/dev/filemon/filemon.c Sat Nov 21 00:54:57 2015 +0000
+++ b/sys/dev/filemon/filemon.c Sat Nov 21 03:34:28 2015 +0000
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.15 2015/11/20 02:58:19 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.16 2015/11/21 03:34:28 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -426,7 +426,7 @@
                break;
 
        default:
-               error = EOPNOTSUPP;
+               error = ENOTTY;
                break;
 
        }



Home | Main Index | Thread Index | Old Index