constfs.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Eistec AB
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
23 #include <stddef.h>
24 #include <stdint.h>
25 
26 #include "vfs.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
35 typedef struct {
36  const char *path;
37  const size_t size;
38  const void *data;
40 
44 typedef struct {
45  const size_t nfiles;
47 } constfs_t;
48 
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
const vfs_file_system_t constfs_file_system
ConstFS file system driver.
A file in ConstFS (file name + contents)
Definition: constfs.h:35
const void * data
pointer to file contents
Definition: constfs.h:38
const char * path
file system relative path to file
Definition: constfs.h:36
const size_t size
length of data
Definition: constfs.h:37
ConstFS file system superblock.
Definition: constfs.h:44
const size_t nfiles
Number of files.
Definition: constfs.h:45
const constfs_file_t * files
Files array.
Definition: constfs.h:46
A file system driver.
Definition: vfs.h:386