Re: Opening files in kernel mode

From: Francis GALIEGUE (fg@mandrakesoft.com)
Date: Fri Jun 02 2000 - 05:01:51 EST


On Fri, 2 Jun 2000, S.Venkat Raman wrote:

> Hi,
> Does anyone know if there is a function to
> open ( and read )a file when working in kernel
> mode. Like for example there is a kernel
> equivalent of printf ( printk ) and malloc (kmalloc).
> Open is not there in <linux/fcntl.h> i am
> also looking for kernel version of read too
> which is also not there in <linux/unistd.h>.
>
> if i try and use <fcntl.h> and <unistd.h> there
> are some conflicts with the other files that
> i include as a result it doesnt compile.
>
> i am need the functions as part of a device driver
> in which i need to open a file and copy the
> contents into the device.
>
> Please CC a reply to me incase you have some
> solution to this problem.
>

Why don't you use a file in /proc for this, or an ioctl?

-- 
fg

"You can tune a filesystem but you can't tuna fish" (HP/UX' fsck manpage)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:14 EST