Rev 2852 | Rev 2858 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2852 | Rev 2857 | ||
---|---|---|---|
Line 73... | Line 73... | ||
73 | static void *tmpfs_node_get(dev_handle_t, fs_index_t, fs_index_t); |
73 | static void *tmpfs_node_get(dev_handle_t, fs_index_t, fs_index_t); |
74 | static void tmpfs_node_put(void *); |
74 | static void tmpfs_node_put(void *); |
75 | static void *tmpfs_create_node(int); |
75 | static void *tmpfs_create_node(int); |
76 | static bool tmpfs_link_node(void *, void *, const char *); |
76 | static bool tmpfs_link_node(void *, void *, const char *); |
77 | static int tmpfs_unlink_node(void *, void *); |
77 | static int tmpfs_unlink_node(void *, void *); |
78 | static void tmpfs_destroy_node(void *); |
78 | static bool tmpfs_destroy_node(void *); |
79 | 79 | ||
80 | /* Implementation of helper functions. */ |
80 | /* Implementation of helper functions. */ |
81 | static fs_index_t tmpfs_index_get(void *nodep) |
81 | static fs_index_t tmpfs_index_get(void *nodep) |
82 | { |
82 | { |
83 | return ((tmpfs_dentry_t *) nodep)->index; |
83 | return ((tmpfs_dentry_t *) nodep)->index; |
Line 372... | Line 372... | ||
372 | childp->lnkcnt--; |
372 | childp->lnkcnt--; |
373 | 373 | ||
374 | return EOK; |
374 | return EOK; |
375 | } |
375 | } |
376 | 376 | ||
377 | void tmpfs_destroy_node(void *nodep) |
377 | bool tmpfs_destroy_node(void *nodep) |
378 | { |
378 | { |
379 | tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) nodep; |
379 | tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) nodep; |
380 | 380 | ||
381 | assert(!dentry->lnkcnt); |
381 | assert(!dentry->lnkcnt); |
382 | assert(!dentry->child); |
382 | assert(!dentry->child); |
Line 388... | Line 388... | ||
388 | hash_table_destroy(&dentry->names); |
388 | hash_table_destroy(&dentry->names); |
389 | 389 | ||
390 | if (dentry->type == TMPFS_FILE) |
390 | if (dentry->type == TMPFS_FILE) |
391 | free(dentry->data); |
391 | free(dentry->data); |
392 | free(dentry); |
392 | free(dentry); |
- | 393 | return true; |
|
393 | } |
394 | } |
394 | 395 | ||
395 | void tmpfs_lookup(ipc_callid_t rid, ipc_call_t *request) |
396 | void tmpfs_lookup(ipc_callid_t rid, ipc_call_t *request) |
396 | { |
397 | { |
397 | /* Initialize TMPFS. */ |
398 | /* Initialize TMPFS. */ |