[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading Module



On Mon, Mar 04, 2002 at 03:16:06PM +0530, Amit Sharma wrote:
> Hey Thanks buddy,
> 
> I will try what u suggested and will surely let u know. Have you tried the
> same piece of code on ur system? Just let me know if the same piece of code
> works on ur system just changing printk(..)
On my SuSE7.3, with 2.4.17 kernel by suse, this code works:
<CODE>
#include <linux/kernel.h>
#include <linux/module.h>

int init_module() {
		  printk(KERN_INFO "hello world\n");
		  return 0;
}

void cleanup_module () {
		  printk(KERN_INFO "bye bye\n");
}
</CODE>
Compiled using :
gcc -DMODULE -D__KERNEL__ -I /lib/modules/`uname -r`/build/include pippo.c -c

> Anywayz which part of the world are u from? Am from India, New Delhi.
Italy :)

Bye :)
-- 
$>cd /pub
$>more beer

(0>
//\  Perego Paolo <p_perego@modiano.com> - www.sikurezza.org/angel
V_/_ 'It's seems the hardest life I've never known'
I'm Linux drow 2.4.17-4GB - SuSE Linux 7.3 (i386) powered.

PGP signature