not show output of simple module
hello i am newer here and also a new user for linux. actutally the problem is that i was writing a simple module for kernel 2.6.30. it does load and unload successfuly, but do not gives required output as it should show. can any body help me. code is so simple here it is
/*
* hello−1.c − The simplest kernel module.
*/
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");
/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}
and here its Makefile
obj−m += hello−1.o
all:
make −C /lib/modules/$(shell uname −r)/build M=$(PWD) modules
clean:
make −C /lib/modules/$(shell uname −r)/build M=$(PWD) clean
after loading it does not show any output, and should show Hello world!
Last edited by supernaturalyasir; 07-03-2009 at 07:26 AM.
|