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