Changes in uspace/srv/fs/cdfs/cdfs_ops.c [5e801dc:48cc66f] in mainline
- File:
-
- 1 edited
-
uspace/srv/fs/cdfs/cdfs_ops.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/cdfs/cdfs_ops.c
r5e801dc r48cc66f 1 1 /* 2 * Copyright (c) 2026 Jiri Svoboda 2 3 * Copyright (c) 2011 Martin Decky 3 4 * All rights reserved. … … 297 298 } 298 299 299 static bool nodes_key_equal(const void *k, const ht_link_t *item)300 static bool nodes_key_equal(const void *k, size_t hash, const ht_link_t *item) 300 301 { 301 302 cdfs_node_t *node = hash_table_get_inst(item, cdfs_node_t, nh_link); … … 323 324 324 325 /** Nodes hash table operations */ 325 static hash_table_ops_t nodes_ops = {326 static const hash_table_ops_t nodes_ops = { 326 327 .hash = nodes_hash, 327 328 .key_hash = nodes_key_hash, … … 340 341 341 342 ht_link_t *link = hash_table_find(&nodes, &key); 342 if (link) { 343 cdfs_node_t *node = 344 hash_table_get_inst(link, cdfs_node_t, nh_link); 345 346 *rfn = FS_NODE(node); 347 } else 343 if (!link) { 348 344 *rfn = NULL; 349 345 return EBADF; 346 } 347 348 cdfs_node_t *node = hash_table_get_inst(link, cdfs_node_t, nh_link); 349 *rfn = FS_NODE(node); 350 350 return EOK; 351 351 } … … 394 394 errno_t rc = cdfs_root_get(&rootfn, fs->service_id); 395 395 396 assert(rc == EOK );396 assert(rc == EOK || rc == EBADF); 397 397 398 398 if (!rootfn) … … 1093 1093 1094 1094 /* Initialize the block layer */ 1095 errno_t rc = block_init(service_id , BLOCK_SIZE);1095 errno_t rc = block_init(service_id); 1096 1096 if (rc != EOK) 1097 1097 return rc; … … 1150 1150 { 1151 1151 /* Initialize the block layer */ 1152 errno_t rc = block_init(service_id , BLOCK_SIZE);1152 errno_t rc = block_init(service_id); 1153 1153 if (rc != EOK) 1154 1154 return rc; … … 1353 1353 cdfs_node_t *node = hash_table_get_inst(item, cdfs_node_t, nh_link); 1354 1354 1355 if (!node->opened) { 1355 /* Remove closed, but root node is always in memory. */ 1356 if (!node->opened && node->index != 0) { 1356 1357 hash_table_remove_item(&nodes, item); 1357 1358
Note:
See TracChangeset
for help on using the changeset viewer.
