salamo alikom
i am having trouble compiling this simple module :
i am having trouble compiling this simple module :
Code:
#include<sys/param.h>
#include<sys/module.h>
#include<sys/kernel.h>
#include<sys/systm.h>
/* this function called whem module loaded-unloaded */
static int
load(struct module *module,int CMD,void *arg)
{
int error = 0;
switch(CMD)
{
case MOD_LOAD:
uprintf("module loaded\n");
break;
case MOD_UNLOAD:
uprintf("module unload");
break;
default:
error = EOPNOTSUPP;
break;
}
return(error);
}
static moduledate_t kkl = {
"KeyLogger", /* module name */
load, /* event handler */
NULL
};
DECLARE_MODULE( KeyLogger , /* module name*/
kkl , /* module struct */
SI_SUB_DRIVERS ,/* module type */
SI_ORDER_MIDDLE /* module position */);