Messages in this thread | | | Date | Wed, 25 May 2005 07:56:06 -0400 | From | "John W. Linville" <> | Subject | Re: File I/O from within a driver |
| |
On Wed, May 25, 2005 at 01:41:43AM -0400, Brian Gerst wrote: > van wrote:
> >the media file. The structure of media files is complex and I'd rather > >the calling application didn't need to have any knowledge of that > >structure. But how can the driver do the necessary read() operations?
> The best way is to mmap() the file into memory, then pass the address to > the driver.
That probably is a good way. An alternative might be for the driver to pass some paramaterized knowledge of the file structure back to the userland app. That would prevent the userland app from having to know as much a priori, but it may be difficult to figure-out how to describe the media files' structure in a paramaterized way.
YMMV... :-)
John -- John W. Linville linville@tuxdriver.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |