Discussion:
Usage of kern_* functions in kernel
(too old to reply)
Marc Lörner
2007-04-26 12:08:19 UTC
Permalink
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!

Regards,
Marc
John Baldwin
2007-04-26 17:49:35 UTC
Permalink
Post by Marc Lörner
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.
--
John Baldwin
Marc Lörner
2007-04-27 06:43:16 UTC
Permalink
Post by John Baldwin
Post by Marc Lörner
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?

--
Marc
John Baldwin
2007-04-27 15:51:54 UTC
Permalink
Post by Marc Lörner
Post by John Baldwin
Post by Marc Lörner
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
Post by Marc Lörner
Post by John Baldwin
Post by Marc Lörner
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
Kip Macy
2007-04-27 19:14:13 UTC
Permalink
For core files and checkpoints that isn't possible.
-Kip
Post by Marc Lörner
Post by Marc Lörner
Post by John Baldwin
Post by Marc Lörner
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
Post by Marc Lörner
Post by John Baldwin
Post by Marc Lörner
for use within kernelspace?
And here a second question: Is it possible to open/use the console
driver
Post by Marc Lörner
Post by John Baldwin
Post by Marc Lörner
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.
Post by Marc Lörner
so, you would recommend using the vn_* functions instead?
In general userland should open files rather than the kernel.
--
John Baldwin
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
Continue reading on narkive:
Search results for 'Usage of kern_* functions in kernel' (Questions and Answers)
10
replies
What is AIX Box?
started 2006-05-08 15:58:44 UTC
hardware
Loading...