1. i looked at the archives , there is a long list of mails on that page , can u plz give me some pointer to the mail ( or mails ) about the resons for not writing in a file from kernel space .
2. i need to save the current mouse position and the status of buttons in a file from the driver , just for sake of understading . what is other solution for this if i can't write in the file from the module ?
the solution i can think of is : to make a proc file in /proc from the driver and write the needed data in it , and then copy it to any other from the proc file with help of a user space routine .
If u have any other solution please suggest the same
Greg KH <greg@kroah.com> wrote:
Greg KH <greg@kroah.com> wrote:
On Sun, Jun 29, 2003 at 06:58:14AM +0100, pankaj chauhan wrote:
>
>
> hi all , ,
>
> as the library function like fopen , fwrite are not available in
> kernel space . so if i want to write some data in a file from a
> kernel module ( actually it is a serial mouse driver ), how it can be
> done ?
Don't do that.
Seriously, do not do that.
Do it from userspace if you really need to write a file.
Read the archives of this list for a more detailed reason for not doing
this from kernel space.
Good luck,
greg k-h