How to enable printk

Wanghong Yuan
2002-04-29T05:20:14Z

Hi,

It may be a simple question. But I cannot see the result of printk in
console like the following. Do i need to enable it somewhere? Thanks

/*-O2 -Wall -DMODULE -D__KERNEL__ -DLINUX -c testsys.c */

#include <linux/sys.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <sys/syscall.h>
#include <asm/uaccess.h>

/* The system call number we attempt to install ourselves as. */
static int syscall_num = 165;

asmlinkage int sys_test(int pid, int period, int cycles, int* ptr)

{

put_user(current->pid, ptr);
return pid-10000;

}

extern int sys_call_table[];

#ifdef MODULE
int init_module(void)
{
printk("yes\n");
sys_call_table[syscall_num] = (int)sys_test;
return 0;
}

void cleanup_module(void)
{
sys_call_table[syscall_num] = 0;
}

#endif /* MODULE */