diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-12 20:19:24 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-12 20:19:24 +0100 |
commit | 862b93742237ed959e9b8dc12a536880ea45d0cf (patch) | |
tree | 188360ae20f8524b36fad6941523c4fada5f0d70 /src/kernel/include/nullfs.h | |
parent | 109b57ea2a8a3dfd88c37a9c00ad301602108efa (diff) | |
download | kogata-862b93742237ed959e9b8dc12a536880ea45d0cf.tar.gz kogata-862b93742237ed959e9b8dc12a536880ea45d0cf.zip |
Adjust nullfs header
Diffstat (limited to 'src/kernel/include/nullfs.h')
-rw-r--r-- | src/kernel/include/nullfs.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/kernel/include/nullfs.h b/src/kernel/include/nullfs.h index 43bad5e..ba6a9c8 100644 --- a/src/kernel/include/nullfs.h +++ b/src/kernel/include/nullfs.h @@ -2,26 +2,18 @@ #include <vfs.h> -#define NULLFS_OPT_CREATE_EN 1 -#define NULLFS_OPT_DELETE_EN 2 +// The nullfs accepts several flags at its creation : +// - c : allow creation of files as ram files +// - d : allow deletion of arbitrary nodes +// - m : allow move operation typedef struct nullfs nullfs_t; -typedef struct { - void* (*open)(void* f, int mode, fs_handle_t *h); - size_t (*read)(void* fd, size_t offset, size_t len, char* buf); - size_t (*write)(void* fd, size_t offset, size_t len, const char* buf); - bool (*stat)(void* f, stat_t *st); - int (*ioctl)(void* f, int command, void* data); - void (*close)(void* fd); - void (*dispose)(void* f); -} nullfs_node_ops_t; - void register_nullfs_driver(); nullfs_t* as_nullfs(fs_t *fs); -bool nullfs_add(nullfs_t *f, const char* name, void* data, nullfs_node_ops_t* ops); -bool nullfs_add_ram_file(nullfs_t *f, const char* name, void* data, size_t init_sz, bool copy, int ok_modes); +bool nullfs_add_node(nullfs_t *f, const char* name, fs_node_ptr data, fs_node_ops_t *ops); +bool nullfs_add_ram_file(nullfs_t *f, const char* name, char* data, size_t init_sz, bool copy, int ok_modes); /* vim: set ts=4 sw=4 tw=0 noet :*/ |