public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Read and write by a module
@ 2003-03-27 13:43 h9916628
  2003-03-27 14:09 ` Andre Heine
  0 siblings, 1 reply; 4+ messages in thread
From: h9916628 @ 2003-03-27 13:43 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Read and write by a module
  2003-03-27 13:43 Read and write by a module h9916628
@ 2003-03-27 14:09 ` Andre Heine
  2003-03-28  9:25   ` George Chang
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Heine @ 2003-03-27 14:09 UTC (permalink / raw)
  To: linux-kernel

Hi,

From: "h9916628" <h9916628@hkusua.hku.hk>
> 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Read and write by a module
  2003-03-27 14:09 ` Andre Heine
@ 2003-03-28  9:25   ` George Chang
  0 siblings, 0 replies; 4+ messages in thread
From: George Chang @ 2003-03-28  9:25 UTC (permalink / raw)
  To: linux-kernel

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" <linux-experience@gmx.net>
To: <linux-kernel@vger.kernel.org>
Sent: Thursday, March 27, 2003 10:09 PM
Subject: Re: Read and write by a module


> Hi,
>
> From: "h9916628" <h9916628@hkusua.hku.hk>
> > 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
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Read and write by a module
       [not found] <E04CF3F88ACBD5119EFE00508BBB2121086322CA@exch-01.noida.hcltech.com>
@ 2003-03-28 19:04 ` George Chang
  0 siblings, 0 replies; 4+ messages in thread
From: George Chang @ 2003-03-28 19:04 UTC (permalink / raw)
  To: Hemanshu Kanji Bhadra, Noida, linux-kernel

Hi all,

Thanks hemanshu. You are very nice

Could I copy the file /proc/ to harddisk? I hope I can directly write the
data to the harddisk as I am working on logging system. I am writing a
function performing like printk , but it directs the event messages to a
specific disk location e.g. /usr/log/sys.log.


Thanks


George

EEE HKU


----- Original Message -----
From: "Hemanshu Kanji Bhadra, Noida" <hemanshub@noida.hcltech.com>
To: "h9916628" <h9916628@hkusua.hku.hk>
Sent: Friday, March 28, 2003 8:01 PM
Subject: RE: Read and write by a module


> Hi,
>
> have you gone thr'u proc_fs guide..
>
> It may help as it contains some help regarding reading and writing in
> kernel.
>
> - hemanshu
>
> -----Original Message-----
> From: h9916628 [mailto:h9916628@hkusua.hku.hk]
> Sent: Thursday, March 27, 2003 7:14 PM
> To: linux-kernel@vger.kernel.org
> Subject: Read and write by a module
> Importance: High
>
>
> 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
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-28 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-27 13:43 Read and write by a module h9916628
2003-03-27 14:09 ` Andre Heine
2003-03-28  9:25   ` George Chang
     [not found] <E04CF3F88ACBD5119EFE00508BBB2121086322CA@exch-01.noida.hcltech.com>
2003-03-28 19:04 ` George Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox