Rev 2844 | Rev 2857 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2844 | Rev 2852 | ||
|---|---|---|---|
| Line 69... | Line 69... | ||
| 69 | */ |
69 | */ |
| 70 | 70 | ||
| 71 | /* Forward declarations of static functions. */ |
71 | /* Forward declarations of static functions. */ |
| 72 | static void *tmpfs_match(void *, const char *); |
72 | static void *tmpfs_match(void *, const char *); |
| 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_create_node(int); |
75 | static void *tmpfs_create_node(int); |
| 75 | static bool tmpfs_link_node(void *, void *, const char *); |
76 | static bool tmpfs_link_node(void *, void *, const char *); |
| 76 | static int tmpfs_unlink_node(void *, void *); |
77 | static int tmpfs_unlink_node(void *, void *); |
| 77 | static void tmpfs_destroy_node(void *); |
78 | static void tmpfs_destroy_node(void *); |
| 78 | 79 | ||
| Line 119... | Line 120... | ||
| 119 | 120 | ||
| 120 | /** libfs operations */ |
121 | /** libfs operations */ |
| 121 | libfs_ops_t tmpfs_libfs_ops = { |
122 | libfs_ops_t tmpfs_libfs_ops = { |
| 122 | .match = tmpfs_match, |
123 | .match = tmpfs_match, |
| 123 | .node_get = tmpfs_node_get, |
124 | .node_get = tmpfs_node_get, |
| - | 125 | .node_put = tmpfs_node_put, |
|
| 124 | .create = tmpfs_create_node, |
126 | .create = tmpfs_create_node, |
| 125 | .destroy = tmpfs_destroy_node, |
127 | .destroy = tmpfs_destroy_node, |
| 126 | .link = tmpfs_link_node, |
128 | .link = tmpfs_link_node, |
| 127 | .unlink = tmpfs_unlink_node, |
129 | .unlink = tmpfs_unlink_node, |
| 128 | .index_get = tmpfs_index_get, |
130 | .index_get = tmpfs_index_get, |
| Line 273... | Line 275... | ||
| 273 | if (!lnk) |
275 | if (!lnk) |
| 274 | return NULL; |
276 | return NULL; |
| 275 | return hash_table_get_instance(lnk, tmpfs_dentry_t, dh_link); |
277 | return hash_table_get_instance(lnk, tmpfs_dentry_t, dh_link); |
| 276 | } |
278 | } |
| 277 | 279 | ||
| - | 280 | void tmpfs_node_put(void *node) |
|
| - | 281 | { |
|
| - | 282 | /* nothing to do */ |
|
| - | 283 | } |
|
| - | 284 | ||
| 278 | void *tmpfs_create_node(int lflag) |
285 | void *tmpfs_create_node(int lflag) |
| 279 | { |
286 | { |
| 280 | assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY)); |
287 | assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY)); |
| 281 | 288 | ||
| 282 | tmpfs_dentry_t *node = malloc(sizeof(tmpfs_dentry_t)); |
289 | tmpfs_dentry_t *node = malloc(sizeof(tmpfs_dentry_t)); |