From 5b5ed23b44ae9eb845ebbac284e0b27822e45ed1 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 28 Dec 2019 13:14:33 +0100 Subject: add ramfs driver --- ramfs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ramfs.h (limited to 'ramfs.h') 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 -- cgit v1.2.3