Skip to contentSkip to conversation

Read and write by a module

DISCUSSION h9916628 2 participants 3 messages Mar 27, 2003 – Mar 28, 2003

lore
Share & tools
lore

h9916628

author
#0 lore raw

Dear all,

Please help! I have to read and write cotents from a file by a module. Could anyone tell me the procedures or advise me? This is very urgent to me. Thanks

I am working on the platform of Rad Hat 7.3 Kernel version 2.4-18

Thanks

George Chang Tak Yin
EEE HKU

#1 lore raw

Hi,

From: "h9916628" <[email protected]>

Quoted 2 lines

Please help! I have to read and write cotents from a file by a module. Could anyone tell me the procedures or advise me? This is very urgent to me. Thanks

On www.oreilly.com is an "free Book", called Linux Device Driver, Author A.Rubini.

This book describe the basic about writing modules & systemcalls ...

There also many tutorial in the web

Bye

Andre

#2 lore raw

Hi all,

I have read the book but it seems not useful for file operation in kernel mdoule. I have completed a read and write part for module. But dont know why the system will hang up when reading and writing the file for more than 3 times.

Could anyone tell me the procedures for file operation in kernel, e.g. do I need spin_locks() first ?
I think another problem is the declaration of char array. I use char *temp= kmalloc(50, GFP_KERNEL), is it correct? I guess the hang-up problem may be due to the null pointer dereference .

Anyone knows about installation and configuration of SGI KDB kernel debugger?

Thanks

George

----- Original Message -----
From: "Andre Heine" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 27, 2003 10:09 PM
Subject: Re: Read and write by a module

Quoted 4 lines

Hi,

From: "h9916628" <[email protected]>

Quoted 1 line

Please help! I have to read and write cotents from a file by a module.

Could

Quoted 1 line
Quoted 1 line

anyone tell me the procedures or advise me? This is very urgent to me.

Thanks

Quoted 2 lines

On www.oreilly.com is an "free Book", called Linux Device Driver, Author

A.Rubini.

Quoted 16 lines

This book describe the basic about writing modules & systemcalls ...

There also many tutorial in the web

Bye

Andre

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/