lkml.org 
[lkml]   [1999]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: PROBLEM: Accessing to file system functions inside the kernel module...
Date
Hello!

> > I'm sorry for repeating question, but I cuoldn't find any information about
> > subj... How can I access to some file (suppose config file) from the kernel
> > module??? Advice me any manual/doc/faq ... about this... Not a book
> > (like The Device Drivers), because I don't think that I can find it in Russia :(
>
> You should not do it. At all. Kernel module is not a process. It has no
> context. With some trickery you could work around that, but exporting all
> the stuff needed for work with files is not an option. Sorry. If you want
> to do it upon the initialization - make the real process feed the data to
> module.

Hmmm... It's really bad idea for working with config files... But, mainly I
want to do the next thing: I want to map some file as block device (i.e.
I want that /dev/??? file is appeared and it's content was identical to the
content of my file)... But, I solved this problem already by use
flip_open(..., ..., ...)->f_op->read/write. (BTW, is it normal way to use
file, or not???)

Thank you for help.

Bye...

-----------------------------------------
Lyahovitsky Grigory (grigory@7ka.mipt.ru)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.037 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site