Write data from user level to RAM file
Hi,
I'm using vanilla 2.6.27.35 with busybox on a Pentium M SBC. What RAM based file system should I use to print messages from a user level application to a file (which is on RAM) ? Can I use "proc" for this purpose ? Thanks. |
/proc is a virtual filesystem provided by the kernel to transport key info to userspace, and occasionally from userspace to the kernel. I have also been search for a filesystem to put on an NVRAM memory segment. So far, my best thought is to create my own simple filesystem back-end in userspace, using fuse as the front end. I was sure there must be a better way, but so far, I haven't found anything. My application is for non-volatile storage on a diskless SBC; sounds similar to your application.
--- rod. |
Quote:
just a file located in RAM that will hold data till reboot/shutdown. What is the optimal way to do it ? Thanks. |
"optimal" is highly subjective.
Use tmpfs - you don't even need to do a mkfs on it, just create files on it. |
All times are GMT -5. The time now is 06:05 PM. |