[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
open, read and write a block device in kernel
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: open, read and write a block device in kernel
- From: Teh Kok How <khteh_(_at_)_willowglen_(_dot_)_com_(_dot_)_my>
- Date: Tue, 14 Jan 2003 08:03:59 +0000
- Organization: Willowglen MSC Berhad
- Reply-to: khteh_(_at_)_willowglen_(_dot_)_com_(_dot_)_my
Hi;
I am writing a device driver that in the <foo>attach routine it should be
able to open a binary file in a flash or a scsi disk based on its pathname
and load it into the secondary PCI memory. Basically what I am trying to
achieve is to read the binary file from a block device and load it into the
DSP internal memory in a PMC. Since open, read and write are userland
syscalls, I would like to know how I could achive the same thing in the
kernel, particularly in the attach routine....
Any suggestion and comment is appreciated.
Regards,
TEH
Visit your host, monkey.org