All of lore.kernel.org
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <mulix@mulix.org>
To: Simon Haynes <simon@baydel.com>
Cc: Matti Aarnio <matti.aarnio@zmailer.org>, linux-kernel@vger.kernel.org
Subject: Re: File access
Date: Thu, 14 Aug 2003 15:28:02 +0300	[thread overview]
Message-ID: <20030814122802.GC7387@actcom.co.il> (raw)
In-Reply-To: <20030814121917.GX6898@mea-ext.zmailer.org>

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

On Thu, Aug 14, 2003 at 03:19:17PM +0300, Matti Aarnio wrote:
> On Thu, Aug 14, 2003 at 12:32:18PM +0100, Simon Haynes wrote:
> > I am currently developing a module which I would like to configure
> > via a simple text file. 
> > 
> > I cannot seem to find any information on accessing files via a kernel 
> > module.
> > 
> > Is this possible and if so how is it done ?
> 
>   Yes, but it is rather complicated business, and really should not
>   be done in kernel.   It can be done, but like Richard said, defining
>   your own set of IOCTLs for the device is better.  The complicated
>   configuration file parsing can then reside in the user-space utility
>   program.

Indeed, do it in user space. But don't use ioctl unless it fits the
problem better than the other solutions. Use read / write on a device
file, or a special purpose file system, or sysfs, or even /proc. The
exact mechanism you should use depends on the nature of the user space
- kernel space communications. 
-- 
Muli Ben-Yehuda
http://www.mulix.org


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2003-08-14 12:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-14 11:32 File access Simon Haynes
2003-08-14 12:07 ` Richard B. Johnson
2003-08-19  9:53   ` Simon Haynes
2003-08-19 12:17     ` Richard B. Johnson
2003-08-19 13:36       ` Simon Haynes
2003-08-19 15:01         ` Richard B. Johnson
2003-08-14 12:19 ` Matti Aarnio
2003-08-14 12:28   ` Muli Ben-Yehuda [this message]

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=20030814122802.GC7387@actcom.co.il \
    --to=mulix@mulix.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.aarnio@zmailer.org \
    --cc=simon@baydel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.