Re: Reading a file inside the device driver.

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Wed Jul 26 2000 - 11:06:49 EST


> Vinay Vernekar wrote:
> I am developing a network driver which has to read a file
> 'firmware.bin' and dump it into the modem memory. I want to know how
> can the file be opened and read inside a driver.

It's much better to do this in userspace as Ted T'so described.

If you must do it in the kernel, just use normal Unix syscalls...
Inside the kernel, they are called sys_open, sys_read, etc. Make sure
the code calling those functions doesn't mind if the called functions
sleep.

        Jeff

-- 
Jeff Garzik              |
Building 1024            | Yossarian lives.
MandrakeSoft, Inc.       |

- 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 : Mon Jul 31 2000 - 21:00:22 EST