Re: Usage of kern_* functions in kernel



On Friday 27 April 2007 02:43:16 am Marc Lörner wrote:
On Thursday 26 April 2007 19:49, John Baldwin wrote:
On Thursday 26 April 2007 08:08:19 am Marc Lörner wrote:
Hello,
I googled but found nothing about the usage of the kern_* functions
(kern_open, kern_close, kern_pwritev, kern_preadv) that are located in
vfs_syscalls.c

When I use kern_open to open a file within the kernel, I get an error.
When I use the normal vn_open function instead, all works well.

So my question is which functions are recommended by you kernel-hackers
for use within kernelspace?

And here a second question: Is it possible to open/use the console
driver
in kernelspace within the functions mentioned above?
If not, can you give me some pointers on where I can find this
information!

kern_XXX are generally used by system calls such as alternative ABIs, etc.

so, you would recommend using the vn_* functions instead?

In general userland should open files rather than the kernel.

--
John Baldwin
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Secure host newbie
    ... > to grab the most recent kernel, well even with RH 9.0 you would still ... I don't recommend Fedora, if you wanted to stay in Red Hat's ... > Grab the newest RPM's for Httpd, OpenSSL, OpenSSH, etc. Pick a good FTP ... > Great source for Linux HowTo's and General system information. ...
    (Security-Basics)
  • Re: new to Fedora Core 2 - its awesome
    ... Opening a terminal window. ... I totally suggest you doing a RPM search by typing: ... and see all the kernel versions you have installed. ... I recommend having the rescue CD ...
    (alt.os.linux.redhat)
  • Re: strange disk access
    ... > At the time I did as you recommend to run top and ps but my system was> operating so poorly all I got to see was a sad load average of 3+ during all> the chaos in GNOME... ... > Although I still need to install the 'cnt' patch to my 2.4 kernel so I can> track disk and network activity on a per process basis with it. ... Any quick> pointers for good tutorials or howtos on debian kernel upgrading etc would> be appreciated. ... >>> Bart ...
    (Debian-User)
  • Re: intel high definition audio
    ... I am having problems with my plextor dvdr px-716a after adding apticam ... to the kernel as recommend in the optical drive section of the handbook ...
    (freebsd-questions)
  • Re: FreeBSD 5.5 -> 6.1 for ISP purposes
    ... But that does seem to have some minor problems as audit does not exist in /etc/group for instance. ... First, I copy the new GENERIC, and make my changes like I had in my old kernel. ... Has any of you upgrade a life system 5.x to 6.1-STABLE? ... I highly recommend 6-STABLE for the many many UFS/VFS bug fixes. ...
    (freebsd-isp)