Re: accessing files, devices, in kernel modules




Yellow wrote:

hi there!

I have just started studying the linux kernel, version 2.6. i read some
manuals, howtos, have already made some really simple modules, but when
I tried to do a little more complex work, I stumbled across some
dificulties.
well, what I want to is a kernel module that opens a regular file,
writes something to it, and closes it. easy, isn't it? I also thought
that ;)

but then I tried making a simple open over the file, but the module
complains it can't find the symbols open, close and write. Is there
Are you doing OPEN(filename, flags)?
anything unusual I must do to work with files in the kernel? none of
the manuals I read mentioned how to open and do some I/O over it.

now, to my real problem: I must record some sound, and then play it!
since in LInux everything is a file, I'm able to do it by means of
/dev/dsp. that's why I asked abou t how to work with regular files. but
I don't know if this way of accessing devices hold for modules. and I
can't open that file!

I looked at /proc/kallsyms, and open is there. I don't have a clue why
the module complains it couldn't find the open.
Kernel opens the files with sys_open, similary sys_close, sys_read,
sys_write and so on.

thanks for any help you could provide, and sorry for such noob question

.



Relevant Pages

  • Re: accessing files, devices, in kernel modules
    ... I have just started studying the linux kernel, ... well, what I want to is a kernel module that opens a regular file, ... the manuals I read mentioned how to open and do some I/O over it. ...
    (comp.os.linux.development.system)
  • accessing files, devices, in kernel modules
    ... I have just started studying the linux kernel, ... well, what I want to is a kernel module that opens a regular file, ... the manuals I read mentioned how to open and do some I/O over it. ...
    (comp.os.linux.development.system)
  • Re: Problem with garage door
    ... There is a pressure adjustment no matter the brand. ... The manuals are online. ... it opens again. ... We tried tightening all the bolts on the door and that seemed to help. ...
    (alt.home.repair)