lkml.org 
[lkml]   [2000]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Reading a file inside the device driver.
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.171 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site