summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lkm.c
diff options
context:
space:
mode:
authordufault <dufault@FreeBSD.org>1997-04-06 11:14:13 +0000
committerdufault <dufault@FreeBSD.org>1997-04-06 11:14:13 +0000
commite62e4c624ae75b13f1812862aa5ffc194f1921a4 (patch)
tree42f3ce7dddb1f896f895a6fd33ad3a2b58ecf4b1 /sys/kern/kern_lkm.c
parent7485dac765253c701a97a0ecb94fefd223c9ea62 (diff)
downloadFreeBSD-src-e62e4c624ae75b13f1812862aa5ffc194f1921a4.zip
FreeBSD-src-e62e4c624ae75b13f1812862aa5ffc194f1921a4.tar.gz
Make MOD_* macros almost consistent:
Use the name argument almost the same in all LKM types. Maintain the current behavior for the external (e.g., modstat) name for DEV, EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only #name. This is a candidate for change and I vote just the name without the "_mod". Change the DISPATCH macro to MOD_DISPATCH for consistency with the other macros. Add an LKM_ANON #define to eliminate the magic -1 and associated signed/unsigned warnings. Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure. Change source in tree to use the new interface. Reviewed by: Bruce Evans
Diffstat (limited to 'sys/kern/kern_lkm.c')
-rw-r--r--sys/kern/kern_lkm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c
index f371c37..5d856ae 100644
--- a/sys/kern/kern_lkm.c
+++ b/sys/kern/kern_lkm.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_lkm.c,v 1.38 1997/03/23 03:36:20 bde Exp $
+ * $Id: kern_lkm.c,v 1.39 1997/03/24 11:24:35 bde Exp $
*/
#include <sys/param.h>
@@ -539,7 +539,7 @@ _lkm_syscall(lkmtp, cmd)
/* don't load twice! */
if (lkmexists(lkmtp))
return(EEXIST);
- if ((i = args->lkm_offset) == -1) { /* auto */
+ if ((i = args->lkm_offset) == LKM_ANON) { /* auto */
/*
* Search the table looking for a slot...
*/
@@ -707,7 +707,7 @@ _lkm_dev(lkmtp, cmd)
return(EEXIST);
switch(args->lkm_devtype) {
case LM_DT_BLOCK:
- if ((i = args->lkm_offset) == -1)
+ if ((i = args->lkm_offset) == LKM_ANON)
descrip = (dev_t) -1;
else
descrip = makedev(args->lkm_offset,0);
@@ -719,7 +719,7 @@ _lkm_dev(lkmtp, cmd)
break;
case LM_DT_CHAR:
- if ((i = args->lkm_offset) == -1)
+ if ((i = args->lkm_offset) == LKM_ANON)
descrip = (dev_t) -1;
else
descrip = makedev(args->lkm_offset,0);
@@ -817,7 +817,7 @@ _lkm_exec(lkmtp, cmd)
/* don't load twice! */
if (lkmexists(lkmtp))
return(EEXIST);
- if ((i = args->lkm_offset) == -1) { /* auto */
+ if ((i = args->lkm_offset) == LKM_ANON) { /* auto */
/*
* Search the table looking for a slot...
*/
OpenPOWER on IntegriCloud