Hi Krishna,
Coding a kernel module is not like coding a user-mode program. You
should never write a module that requires reading or writing to any
logical device. The kernel is the thing that translates physical
I/O to logical I/O. Attempting to perform logical I/O in the kernel
is effectively going backwards.
The kernel is not a process. A file-descriptor needs a process-context
for it to mean anything. Otherwise how would the kernel keep your
STDIN_FILENO separate from somebody else's STDIN_FILENO?
However if you want to open a file for writing please refer this example
at
http://www2.fsmlabs.com/pipermail/rtl/2002-November/011218.html
Regards,
Jayant.
----- Original Message -----
From: "krishnaprasad yalavarthi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 4:23 PM
Subject: [LIH]problem opening a file
> Hi guys,
> I'm working on a kernel module named osiwan,
> wanx25 designed to kernel v2.4.0 and I need to create
> a "etc/osiwan_proto.log" file to do write some logging
> information.
>
> i have tried by using
> open("etc/osiwan_proto.log", "w"); and
> fopen("etc/osiwan_proto.log", "w"); but both of these
> the file is not at all opened.
>
> may i plz request you to help me.
>
> krishna prasad yalavarthi
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> linux-india-help mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/linux-india-help
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help