public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux lover <linux_lover2004@yahoo.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: How to read file in kernel module?
Date: Mon, 07 Feb 2005 11:13:24 +0100	[thread overview]
Message-ID: <1107771204.7327.62.camel@pegasus> (raw)
In-Reply-To: <1107758316.3886.58.camel@laptopd505.fenrus.org>

Hi,

> >         I have written one /proc file creation kernel
> > module. This module creates /proc/file and defied
> > operations on it. Also i have written user program
> > that will read & write to /proc files from user space.
> > Now what i want is to use same bufproc_read &
> > bufproc_write  functions defined in /proc file
> > handling kernel module to be used in another kernel
> > module to read that /proc/file in kernel module.The
> > second kernel module only used to read /proc file in
> > kernel. I am not understanding how can i open that
> > /proc/file in second kenrel module to read in kernel?
> > regards,
> 
> the answer really is that you should not read files from kernel
> modules; /proc or otherwise.

the only thing that is may needed by a kernel driver should be an
external firmware file and for that we have request_firmware(). For
everything else you are on the wrong track.

Regards

Marcel



  reply	other threads:[~2005-02-07 10:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-07  6:17 How to read file in kernel module? linux lover
2005-02-07  6:38 ` Arjan van de Ven
2005-02-07 10:13   ` Marcel Holtmann [this message]
2005-02-07 13:00   ` Michelle Konzack
2005-02-07 16:52   ` Valdis.Kletnieks
2005-02-07 14:29 ` Olaf Dietsche
  -- strict thread matches above, loose matches on Subject: below --
2005-01-10 13:30 linux lover
2005-01-10 16:15 ` Fao, Sean

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=1107771204.7327.62.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_lover2004@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox