2005-01-10 13:30:51

by linux lover

[permalink] [raw]
Subject: How to read file in kernel module?


I want to read file in kernel module. can
anybody help me by giving code for that?
Also whats suitable way to do that in kernel /proc or
shared memory? what i want is to read and write a user
file frequently.
regards,
linux_lover



__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250


2005-01-10 16:15:30

by Fao, Sean

[permalink] [raw]
Subject: Re: How to read file in kernel module?

linux lover wrote:

> I want to read file in kernel module. can
>anybody help me by giving code for that?
>Also whats suitable way to do that in kernel /proc or
>shared memory? what i want is to read and write a user
>file frequently.
>regards,
>

Linux Lover,

After reading a number of posts from you in the past couple of months,
it's become rather obvious that you're taking a brute force approach to
Linux kernel development rather than starting from the beginning and
working your way up. Furthermore, some of the questions you ask
indicate that you're approaching kernel programming the same way you
would program in user space.

Others (myself included) have suggested a couple of books to get you
started quickly. It will take some work on your part, however, if you
ever want to be a proficient kernel developer. Examples are good to
back up theory, but are a horrible way to learn any kind of programming.

Please take us up on our advise to do some reading. I can promiss you
that the energy you spend on reading will be time well spent if Linux
kernel programming is for you. If you have questions about portions you
read in the book, somebody here might be willing to give you a hand.

Please do not take this as an insult. You sound like you have a lot of
interest in Kernel development. If that's the case, I'd like to see you
turn into a good developer, not just another "so-so" programmer.

Good luck,

--
Sean