Introduced lkm_nullcmd(), which will be used instead of nosys() in

some places to fix type mismatches.

Added prototypes and bogus casts.
This commit is contained in:
Bruce Evans
1995-11-09 09:43:32 +00:00
parent 23085add93
commit 5739bf963a
+22 -3
View File
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: kern_lkm.c,v 1.16 1995/10/04 03:42:39 julian Exp $ * $Id: kern_lkm.c,v 1.17 1995/11/06 00:35:50 bde Exp $
*/ */
/* /*
@@ -42,6 +42,7 @@
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/tty.h> #include <sys/tty.h>
#include <sys/conf.h> #include <sys/conf.h>
@@ -81,6 +82,12 @@ static int lkm_state = LKMS_IDLE;
static struct lkm_table lkmods[MAXLKMS]; /* table of loaded modules */ static struct lkm_table lkmods[MAXLKMS]; /* table of loaded modules */
static struct lkm_table *curp; /* global for in-progress ops */ static struct lkm_table *curp; /* global for in-progress ops */
static int _lkm_dev __P((struct lkm_table *lkmtp, int cmd));
static int _lkm_exec __P((struct lkm_table *lkmtp, int cmd));
static int _lkm_vfs __P((struct lkm_table *lkmtp, int cmd));
static int _lkm_syscall __P((struct lkm_table *lkmtp, int cmd));
static void lkmunreserve __P((void));
/*ARGSUSED*/ /*ARGSUSED*/
int int
lkmcopen(dev, flag, devtype, p) lkmcopen(dev, flag, devtype, p)
@@ -295,7 +302,9 @@ lkmcioctl(dev, cmd, data, flag, p)
return ENXIO; return ENXIO;
} }
curp->entry = (int (*)()) (*((int *) (data))); /* XXX gack */
curp->entry = (int (*) __P((struct lkm_table *, int, int)))
(*((int *)data));
/* call entry(load)... (assigns "private" portion) */ /* call entry(load)... (assigns "private" portion) */
err = (*(curp->entry))(curp, LKM_E_LOAD, LKM_VERSION); err = (*(curp->entry))(curp, LKM_E_LOAD, LKM_VERSION);
@@ -539,7 +548,8 @@ _lkm_syscall(lkmtp, cmd)
* Search the table looking for a slot... * Search the table looking for a slot...
*/ */
for (i = 0; i < aout_sysvec.sv_size; i++) for (i = 0; i < aout_sysvec.sv_size; i++)
if (aout_sysvec.sv_table[i].sy_call == lkmnosys) if (aout_sysvec.sv_table[i].sy_call ==
(sy_call_t *)lkmnosys)
break; /* found it! */ break; /* found it! */
/* out of allocable slots? */ /* out of allocable slots? */
if (i == aout_sysvec.sv_size) { if (i == aout_sysvec.sv_size) {
@@ -970,3 +980,12 @@ lkmdispatch(lkmtp, cmd)
return(err); return(err);
} }
int
lkm_nullcmd(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
return (0);
}