yang wrote:
> Hi all,
> when define _KERNEL, I use:
> FILE * fp;
> fp=fileopen("path","w");

I assume you mean fopen().  That is a stdio interface which exists only 
in userland via libc.

When you say you defined _KERNEL are you actually building a kernel 
module ?  If not then you should not define _KERNEL.

> So in C files , how can I open a fild and write something into it in _KERNEL 
> stat?

It is quite difficult and usually avoided to read files in the kernel. 
Instead a userland helper program is often used to read and parse the 
file into structured content and pass it over an ioctl or syscall to the 
kernel driver.

-- 
Darren J Moffat
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to