Problema na compilação

alicornio alicornio em ig.com.br
Domingo Junho 3 03:14:26 BRT 2007


Oi 

Estou tentando aprender sobre lkm. 

Alguém pode me dizer por que não compila? 

#include <sys/param.h> 
#include <sys/systm.h> 
#include <sys/ioctl.h> 
#include <sys/cdefs.h> 
#include <sys/conf.h> 
#include <sys/mount.h> 
#include <sys/exec.h> 
#include <sys/lkm.h> 
#include <sys/proc.h> 

MOD_MISC(testemodulo) 

int manipulador(struct lkm_table *lkmtp, int cmd) 


int 
xxxinit(struct lkm_table *lkmtp, int cmd, int ver) 
{ 
	DISPATCH(lkmtp, cmd, ver, manipulador, manipulador, lkm_nofunc) 
} 

int 
manipulador(struct lkm_table *lkmtp, int cmd) 
{ 
	if (cmd == LKM_E_LOAD) 
		printf("Hello World!\n"); 
	else if ( cmd == LKM_E_UNLOAD) 
		printf("Bye Bye!\n"); 

	return (0); 
} 
-/* 
- * root:devTeste # cc -D_KERNEL -D_SYS_LKM_H_ -I/sys -c 
- * modulo_teste.c 
- * modulo_teste.c: In function `MOD_MISC': 
- * modulo_teste.c:16: error: syntax error before "int" 
- * 
- */ 




Mais detalhes sobre a lista de discussão Openbsd