lkml.org 
[lkml]   [2000]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: file->f_op_>write problem
Hello,

> I am trying to implement something like Windows recycle bin into Linux
> kernel. I need to save the entire filename of each unlinked file into a
> special file. So I open that special file via filp_open and then I write
> into it via file->f_op->write.
> But it returns me EFAULT. I guess its because generic_file_write calls
> copy_from_user and the buffer which I am trying to write from is not in
> user space.
> Is there any easy solution of my problem?

Yes, just use set_fs() -- net/ipv4/ipconfig.c can serve as an example.

Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
"Windows Error: 004 - Operator fell asleep while waiting."

-
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:57    [W:0.036 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site