Re: what`s wrong?

From: Jerry Cooperstein (coop@axian.com)
Date: Wed Apr 24 2002 - 19:42:31 EST


On Wed, Apr 24, 2002 at 10:40:56AM -0600, Andreas Dilger wrote:
> On Apr 24, 2002 18:06 +0200, il boba wrote:
> > Is there anybody that can help me understand what`s wrong with this code?
......

Even with all this he's going to have trouble since his buffer is in
kernel space and the read is going to expect it to be in user-context...

Reading and writing files from within the kernel is almost never a good
idea and has been made difficult by design. He should look at what
he is trying to do and perhaps look for another interface, such as
use of ioctls, proc, seq_file, etc.. He probably doesn't need to
do this I/O from within the kernel and should rethink it.

 Jerry Cooperstein <coop@axian.com>
 Senior Consultant
 Axian, Inc. <info@axian.com>
 4800 SW Griffith Dr., Ste. 202, Beaverton, OR 97005 USA
 http://www.axian.com/ Software Consulting and Training

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:10 EST