Opening and wriiting to file in Kern

Kamal R. Prasad kamalpr at yahoo.com
Sun Feb 6 04:22:42 PST 2005


--- Scott Long <scottl at freebsd.org> wrote:

> Ashwin Chandra wrote:
> 
> > Does anyone know the correct calls to open a file,
> write to it, and close it, IN *kernel* mode. 
> > 
> > Ash
> 
> There is no common API for doing this, which is
> pretty much on purpose. 
>   First, you need to ask yourself why your task
> needs it done in the 
> kernel and not in userland.
> 
A feature implemented within the kernel that requires
making stuff persistent would almost certainly require
file I/O. For that matter, a kernel (module) that
reads a configuration file will also need the same
facility. I don't see anything wrong with providing a
stream (like) interface to the filesystem.

regards
-kamal



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


More information about the freebsd-hackers mailing list