Messages in this thread | | | Date | Thu, 28 Oct 2004 11:48:51 +0200 | Subject | Re: loopback on block device | From | Helge Hafting <> |
| |
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 - 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/
| |