public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Brian Gerst <bgerst@didntduck.org>
Cc: van <van.wanless@eqware.net>, linux-kernel@vger.kernel.org
Subject: Re: File I/O from within a driver
Date: Wed, 25 May 2005 07:56:06 -0400	[thread overview]
Message-ID: <20050525115605.GA17005@tuxdriver.com> (raw)
In-Reply-To: <42941017.3090707@didntduck.org>

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

  reply	other threads:[~2005-05-25 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25  5:15 File I/O from within a driver van
2005-05-25  5:41 ` Brian Gerst
2005-05-25 11:56   ` John W. Linville [this message]
2005-05-25 12:18 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050525115605.GA17005@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=van.wanless@eqware.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox