I read the FAQ. Technically,
it is right, but useless.8-( I have a kernel module to do the
statistic for compactflash partition 1, and have to save to partition 2. I am
using kernel 2.6.11 . Do you have any good idea to do it? Thanks.
From: Erik Mouw [mailto:mouw@xxxxxxxxxxxx]
Sent: Mon 12/18/2006 4:12 AM
To: Junhan Zhang (junhan)
Cc: kernelnewbies@xxxxxxxxxxxx
Subject: Re: Unable to read/write in kernel module
On Sun, Dec 17, 2006 at 06:59:37PM -0800, Junhan Zhang (junhan)
wrote:
> I have a compact flash with 2 partitions /dev/hda1 and
/dev/hda2.
> I tried to open("/dev/hda2", O_RDWR, 0644); which is from
user space.
> It is fine to write/read. However, after I moved to kernel
module, I
> always got return 0 for read/write. My source code is below.
Could
> you help me figure out the problem? Thanks.
Please read the
FAQ:
http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad
Erik
--
They're
all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. --
Matthew Lammers in alt.sysadmin.recovery