Re: Using sys_open() in a module

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 14 Oct 1997 08:25:55 +0100 (BST)


> I'm trying to write a module which uses sys_open() to read from a
> configuration file. Strangely enough, it doesn't seem to be able to

This is a very bad idea - suppose the user wants to move the configuration
file location. Better to put the parsing of the configuration file into
parameters in user space and pass arguments to insmod

> and I'm trying to open it just for reading. Is there any weird
> semantics to using sys_open() from a module that I should be aware of?

Yes. sys_open takes its path name from user space. If you must do this
get the latest DaveM snapshot and look in the sound directory at the
firmware loading routines