Broken device LKM in 2.2

[ Available lists | Index of freebsd-hackers | Month of Oct 1997 | Week of 20 Oct 1997 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Archie Cobbs <archie@whistle.com>
Date
20 Oct 1997 17:01:09
Subject
Broken device LKM in 2.2
Message-ID
199710210000.RAA11140@bubba.whistle.com

Replies

[ Hide this part ]
 
I guess nobody makes device type LKM's in 2.2.. but sys/lkm.h is
broken with respect to them. Here's a hack that fixes this. Perhaps
the "name ## _module", which is different from the other module
types, is there for some reason (?)

Anyway, it's incompatible with the DISPATCH macro defined later in
the file, and this fixes it...

More properly we should use MOD_DISPATCH instead of DISPATCH,
keep the "name ## _module" in MOD_DEV, add it also to the
other types, and use the first argument of MOD_DISPATCH -- the
module name -- in that macro to do a similar concatenation there.

-Archie

Index: lkm.h
===================================================================
RCS file: /cvs/freebsd/src/sys/sys/lkm.h,v
retrieving revision 1.12.2.1
diff -c -r1.12.2.1 lkm.h
*** 1.12.2.1 1997/06/29 08:45:45
--- lkm.h 1997/10/20 23:23:49
***************
*** 234,240 ****

#define MOD_DEV(name,devtype,devslot,devp) \
MOD_DECL(name); \
! static struct lkm_dev name ## _module = { \
LM_DEV, \
LKM_VERSION, \
#name ## "_mod", \
--- 234,240 ----

#define MOD_DEV(name,devtype,devslot,devp) \
MOD_DECL(name); \
! static struct lkm_dev _module = { \
LM_DEV, \
LKM_VERSION, \
#name ## "_mod", \


___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com


Elapsed time: 0.080 seconds