# error in compiling simple module



## SIFE (Jan 12, 2010)

salamo alikom
i am having trouble compiling this simple module :

```
#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 */);
```


----------



## GPF (Jan 13, 2010)

It's a simple typo, I just compiled it.


```
static moduledat[B]a[/B]_t kkl
```

instead of 


```
static moduledat[B]e[/B]_t kkl
```

happy hacking!


----------



## SIFE (Jan 13, 2010)

now it is compiled successfully .


----------



## GPF (Jan 13, 2010)

You 're welcome


----------

