The friendly Operating System for the Internet of Things
constfs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Eistec AB
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
24 #ifndef CONSTFS_H_
25 #define CONSTFS_H_
26 
27 #include <stddef.h>
28 #include <stdint.h>
29 
30 #include "vfs.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 typedef struct {
40  const char *path;
41  const size_t size;
42  const uint8_t *data;
44 
48 typedef struct {
49  const size_t nfiles;
51 } constfs_t;
52 
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif
65 
const uint8_t * data
pointer to file contents
Definition: constfs.h:42
const constfs_file_t * files
Files array.
Definition: constfs.h:50
VFS layer API declarations.
const char * path
file system relative path to file
Definition: constfs.h:40
const size_t size
length of data
Definition: constfs.h:41
const size_t nfiles
Number of files.
Definition: constfs.h:49
const vfs_file_system_t constfs_file_system
ConstFS file system driver.
ConstFS file system superblock.
Definition: constfs.h:48
A file in ConstFS (file name + contents)
Definition: constfs.h:39
A file system driver.
Definition: vfs.h:163