Re: Loading Module

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

 



On Fri, Jan 04, 2002 at 02:32:22PM +0530, Amit Sharma wrote:
> Hi there again,
> Thanks Anil and Mr. Perego for the replies.
For me forget about Mr. I'm 25 years old and you can call me Paolo :)))

> Let me start with saying that this is was my first xperience on a mailing
> list and am damned impressed with the kind of help one can get from here.
We are here to share our knowledge and to improve ourselves ;)

> #define MODULE
During compile do you define also __KERNEL__ ? [ if not pass -D__KERNEL__ to
gcc ]

> # include <linux/module.h>
> int init_module(void) { printk {<1>"Hello World\n"}; return 0; }
Try to put a space between <1> and "Hello..." and... wait you write printk
{...} the { } are typo errors I suppose...
Remember that the prototype is printk ( ... ).
> void cleanup_module(void) { printk {<1> bye bye"); }

My opinion is that sounds better to use KERN_* instead <1>-<7>. You can find
them in : /usr/src/linux/include/linux/kernel.h ( of course 
#include <linux/kernel.h> will be needed ) :)
Your statements will change in:
printk(KERN_ALERT "Hello world\n");
printk(KERN_ALERT "bye bye\n");
IMHO the code is more readable.

I can't figure out where is the problem. :(
Please checkout your date. It seems you are writing on 04 january :)
-- 
$>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.

Attachment: pgp00035.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux