Changeset c91f2d1b in mainline for uspace/lib/libblock/libblock.c
- Timestamp:
- 2009-08-27T18:31:27Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cd688d9
- Parents:
- 02ee6bf5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libblock/libblock.c
r02ee6bf5 rc91f2d1b 313 313 /** Instantiate a block in memory and get a reference to it. 314 314 * 315 * @param block Pointer to where the function will store the 316 * block pointer on success. 315 317 * @param dev_handle Device handle of the block device. 316 318 * @param boff Block offset. … … 319 321 * device. 320 322 * 321 * @return Block structure.322 */ 323 block_t *block_get(dev_handle_t dev_handle, bn_t boff, int flags)323 * @return EOK on success or a negative error code. 324 */ 325 int block_get(block_t **block, dev_handle_t dev_handle, bn_t boff, int flags) 324 326 { 325 327 devcon_t *devcon; … … 450 452 fibril_mutex_unlock(&b->lock); 451 453 } 452 return b; 454 *block = b; 455 return EOK; 453 456 } 454 457 … … 458 461 * 459 462 * @param block Block of which a reference is to be released. 460 */ 461 void block_put(block_t *block) 463 * 464 * @return EOK on success or a negative error code. 465 */ 466 int block_put(block_t *block) 462 467 { 463 468 devcon_t *devcon = devcon_search(block->dev_handle); … … 546 551 fibril_mutex_unlock(&block->lock); 547 552 fibril_mutex_unlock(&cache->lock); 553 554 return EOK; 548 555 } 549 556
Note:
See TracChangeset
for help on using the changeset viewer.