aboutsummaryrefslogtreecommitdiff
path: root/ramfs.h
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-28 13:14:33 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-28 13:14:33 +0100
commit5b5ed23b44ae9eb845ebbac284e0b27822e45ed1 (patch)
tree431fd793491ea36131b09cd5877c5229f01356ce /ramfs.h
parent311ddd85042170f35736b9491ce952ee51e21db1 (diff)
downloadrpi-MMU-example-5b5ed23b44ae9eb845ebbac284e0b27822e45ed1.tar.gz
rpi-MMU-example-5b5ed23b44ae9eb845ebbac284e0b27822e45ed1.zip
add ramfs driver
Diffstat (limited to 'ramfs.h')
-rw-r--r--ramfs.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ramfs.h b/ramfs.h
new file mode 100644
index 0000000..cf45736
--- /dev/null
+++ b/ramfs.h
@@ -0,0 +1,16 @@
+#ifndef RAMFS_H
+#define RAMFS_H
+
+struct ramfile
+{
+ char *file_name;
+ uint32_t file_size;
+ char *file_contents;
+};
+
+// search for file named filename in ramfs;
+// If found - return 0 and fill buf fields with file's info.
+// Otherwise return a non-zero value.
+int find_file(void *ramfs, char *filename, struct ramfile *buf);
+
+#endif // RAMFS_H