mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Hafting <helgehaf@aitel.hist.no>
To: Lei Yang <lya755@ece.northwestern.edu>
Cc: linux-os@analogic.com, linux-kernel@vger.kernel.org
Subject: Re: loopback on block device
Date: Thu, 28 Oct 2004 11:48:51 +0200	[thread overview]
Message-ID: <20041028094851.GC13523@hh.idb.hist.no> (raw)
In-Reply-To: <417FFA38.8000602@ece.northwestern.edu>

On Wed, Oct 27, 2004 at 02:42:48PM -0500, Lei Yang wrote:
> Why /dev/ram0 is a file? Can you get into more details? For example, if 
> I want to do some system level programming and write to a /dev/ram0, how 
> do I do it?
> 

I don't think you need an example.  You can open it in exactly
the same way as you open regular files like /etc/resolv.conf.

ie.
FILE *f = fopen("/dev/ram0", "rw");
Then use fseek, fwrite and fread as usual.

Helge Hafting

      reply	other threads:[~2004-10-28  9:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27 18:20 Lei Yang
2004-10-27 18:29 ` Lei Yang
2004-10-28  0:31   ` Al Viro
2004-10-27 18:58 ` linux-os
2004-10-27 19:42   ` Lei Yang
2004-10-28  9:48     ` Helge Hafting [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=20041028094851.GC13523@hh.idb.hist.no \
    --to=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=lya755@ece.northwestern.edu \
    /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

all inboxes | Powered by JetHome®