aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/user')
-rw-r--r--src/kernel/user/nullfs.c8
-rw-r--r--src/kernel/user/process.c4
-rw-r--r--src/kernel/user/vfs.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/user/nullfs.c b/src/kernel/user/nullfs.c
index 1685f4c..97f3d00 100644
--- a/src/kernel/user/nullfs.c
+++ b/src/kernel/user/nullfs.c
@@ -149,7 +149,7 @@ bool nullfs_fs_make(fs_handle_t *source, char* opts, fs_t *fs_s) {
root->fs = fs;
root->items_list = 0;
root->lock = MUTEX_UNLOCKED;
- root->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0, 0);
+ root->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0);
if (root->items_idx == 0) {
free(root);
free(fs);
@@ -308,7 +308,7 @@ bool nullfs_d_delete(fs_node_ptr n, const char* file) {
nullfs_dir_t* sd = (nullfs_dir_t*)i->data;
if (sd->items_list != 0) return false;
- delete_hashtbl(sd->items_idx, 0);
+ delete_hashtbl(sd->items_idx);
free(sd);
} else if (i->ops == &nullfs_f_ops) {
nullfs_file_t* f = (nullfs_file_t*)i->data;
@@ -384,7 +384,7 @@ bool nullfs_d_create(fs_node_ptr n, const char* file, int type) {
nullfs_dir_t *x = (nullfs_dir_t*)malloc(sizeof(nullfs_dir_t));
if (x == 0) return false;
- x->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0, 0);
+ x->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0);
if (x->items_idx == 0) goto d_error;
x->items_list = 0;
@@ -411,7 +411,7 @@ bool nullfs_d_create(fs_node_ptr n, const char* file, int type) {
d_error:
if (i != 0 && i->name != 0) free(i->name);
if (i != 0) free(i);
- if (x->items_idx != 0) delete_hashtbl(x->items_idx, 0);
+ if (x->items_idx != 0) delete_hashtbl(x->items_idx);
free(x);
return false;
} else {
diff --git a/src/kernel/user/process.c b/src/kernel/user/process.c
index d1fdf32..2f3cac1 100644
--- a/src/kernel/user/process.c
+++ b/src/kernel/user/process.c
@@ -35,7 +35,7 @@ process_t *new_process(process_t *parent) {
process_t *proc = (process_t*)malloc(sizeof(process_t));
if (proc == 0) return 0;
- proc->filesystems = create_hashtbl(str_key_eq_fun, str_hash_fun, free, 0);
+ proc->filesystems = create_hashtbl(str_key_eq_fun, str_hash_fun, free_key);
if (proc->filesystems == 0) {
free(proc);
return 0;
@@ -43,7 +43,7 @@ process_t *new_process(process_t *parent) {
proc->pd = create_pagedir(proc_usermem_pf, proc);
if (proc->pd == 0) {
- delete_hashtbl(proc->filesystems, 0);
+ delete_hashtbl(proc->filesystems);
free(proc);
return 0;
}
diff --git a/src/kernel/user/vfs.c b/src/kernel/user/vfs.c
index 0624a38..1f7bacd 100644
--- a/src/kernel/user/vfs.c
+++ b/src/kernel/user/vfs.c
@@ -95,7 +95,7 @@ void unref_fs_node(fs_node_t *n) {
unref_fs_node(n->parent);
unref_fs(n->fs);
- if (n->children != 0) delete_hashtbl(n->children, 0);
+ if (n->children != 0) delete_hashtbl(n->children);
free(n->name);
free(n);
}
@@ -126,7 +126,7 @@ fs_node_t* fs_walk_one(fs_node_t* from, const char* file) {
if (!walk_ok) goto error;
if (from->children == 0) {
- from->children = create_hashtbl(str_key_eq_fun, str_hash_fun, 0, 0);
+ from->children = create_hashtbl(str_key_eq_fun, str_hash_fun, 0);
if (from->children == 0) goto error;
}