diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-09 17:04:04 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-09 17:04:04 +0100 |
commit | 3341e7a3a184b5bea17f0f678b40bc51c92d72a4 (patch) | |
tree | c77a940a371148b256676f7b59caaecc725a1f1d /src/kernel/user/vfs.c | |
parent | 436418e575b68fd7e85f7fdaf039e03874ec1cb9 (diff) | |
download | kogata-3341e7a3a184b5bea17f0f678b40bc51c92d72a4.tar.gz kogata-3341e7a3a184b5bea17f0f678b40bc51c92d72a4.zip |
Partial implement VFS pager (enough for ISO9660!)
Also add some debugging facilities (especially stack trace).
Diffstat (limited to 'src/kernel/user/vfs.c')
-rw-r--r-- | src/kernel/user/vfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kernel/user/vfs.c b/src/kernel/user/vfs.c index 1fa1cc2..66ede94 100644 --- a/src/kernel/user/vfs.c +++ b/src/kernel/user/vfs.c @@ -101,7 +101,7 @@ void unref_fs(fs_t *fs) { unref_fs_node(fs->root); } else { ASSERT(fs->root->refs == 1); - if (fs->root->ops->dispose) fs->root->ops->dispose(fs->root->data); + if (fs->root->ops->dispose) fs->root->ops->dispose(fs->root); } if (fs->ops->shutdown) fs->ops->shutdown(fs->data); free(fs); @@ -130,7 +130,7 @@ void unref_fs_node(fs_node_t *n) { mutex_lock(&n->parent->lock); hashtbl_remove(n->parent->children, n->name); - if (n->ops->dispose) n->ops->dispose(n->data); + if (n->ops->dispose) n->ops->dispose(n); mutex_unlock(&n->parent->lock); unref_fs_node(n->parent); @@ -144,7 +144,7 @@ void unref_fs_node(fs_node_t *n) { // stand-alone IPC/SHM object ASSERT(n->parent == 0 && n->children == 0); - if (n->ops->dispose) n->ops->dispose(n->data); + if (n->ops->dispose) n->ops->dispose(n); } if (n->name) free(n->name); free(n); @@ -178,7 +178,7 @@ fs_node_t* fs_walk_one(fs_node_t* from, const char* file) { n->name = strdup(file); if (n->name == 0) goto error; - walk_ok = from->ops->walk && from->ops->walk(from->data, file, n); + walk_ok = from->ops->walk && from->ops->walk(from, file, n); if (!walk_ok) goto error; if (from->children == 0) { @@ -197,7 +197,7 @@ fs_node_t* fs_walk_one(fs_node_t* from, const char* file) { return n; error: - if (walk_ok) n->ops->dispose(n->data); + if (walk_ok) n->ops->dispose(n); if (n != 0 && n->name != 0) free(n->name); if (n != 0) free(n); mutex_unlock(&from->lock); |