Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Feb 2002 22:51:08 -0600
From:      "Mike Meyer" <mwm-dated-1013748669.0133b4@mired.org>
To:        abhijit vaidya <sherlockabhi@yahoo.com>
Cc:        questions@freebsd.org
Subject:   Re: Kernel File I/O
Message-ID:  <15461.64572.790859.177300@guru.mired.org>
In-Reply-To: <34479115@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
abhijit vaidya <sherlockabhi@yahoo.com> types:

>     I want to access a file "/usr/cache" which is a file created by me in /usr. I want to write some data into it through kernel space. I want to do file I/O from kernel. Please tell me what should i use? i mean how to use open and write system calls in kernel to access files.


Please set your mailer to use hard newlines every 70 or so characters.

Anyway, the answer is "you can't". There are some kludges floating
around to do this kind of thing, but that's just what they are -
kludges.

Instead, make the data available via a sysctl - which is easy - and
then have userland code copy it to /usr/cache.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15461.64572.790859.177300>