aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/nullfs.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-09 11:49:30 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-09 11:49:30 +0100
commit8c1f280c1bc948a20e244b32d824780b08bf85c9 (patch)
tree6288a0c801c05a2c06378d75a912f06b86438c3d /src/kernel/user/nullfs.c
parent6dd488b87fdc47fb377ba648a6cd598bdab87f59 (diff)
downloadkogata-8c1f280c1bc948a20e244b32d824780b08bf85c9.tar.gz
kogata-8c1f280c1bc948a20e244b32d824780b08bf85c9.zip
Require all fs_handle_t objects to point to a node.
Diffstat (limited to 'src/kernel/user/nullfs.c')
-rw-r--r--src/kernel/user/nullfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/user/nullfs.c b/src/kernel/user/nullfs.c
index 0dc1b22..1f40d88 100644
--- a/src/kernel/user/nullfs.c
+++ b/src/kernel/user/nullfs.c
@@ -415,7 +415,7 @@ void nullfs_d_dispose(fs_node_ptr n) {
bool nullfs_d_readdir(fs_handle_t *f, size_t ent_no, dirent_t *d) {
// Very nonefficient !!
- nullfs_dir_t *h = (nullfs_dir_t*)f->data;
+ nullfs_dir_t *h = (nullfs_dir_t*)f->node->data;
mutex_lock(&h->lock);
@@ -489,7 +489,7 @@ void nullfs_f_dispose(fs_node_ptr n) {
// -- File handle --
static size_t nullfs_f_read(fs_handle_t *h, size_t offset, size_t len, char* buf) {
- nullfs_file_t *f = (nullfs_file_t*)h->data;
+ nullfs_file_t *f = (nullfs_file_t*)h->node->data;
mutex_lock(&f->lock);
size_t ret = 0;
@@ -506,7 +506,7 @@ end_read:
}
static size_t nullfs_f_write(fs_handle_t *h, size_t offset, size_t len, const char* buf) {
- nullfs_file_t *f = (nullfs_file_t*)h->data;
+ nullfs_file_t *f = (nullfs_file_t*)h->node->data;
mutex_lock(&f->lock);
size_t ret = 0;