Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/src/extent.c

    r38d150e rb7fd2a0  
    372372 *
    373373 */
    374 int ext4_extent_find_block(ext4_inode_ref_t *inode_ref, uint32_t iblock,
     374errno_t ext4_extent_find_block(ext4_inode_ref_t *inode_ref, uint32_t iblock,
    375375    uint32_t *fblock)
    376376{
    377         int rc = EOK;
     377        errno_t rc = EOK;
    378378        /* Compute bound defined by i-node size */
    379379        uint64_t inode_size =
     
    454454 *
    455455 */
    456 static int ext4_extent_find_extent(ext4_inode_ref_t *inode_ref, uint32_t iblock,
     456static errno_t ext4_extent_find_extent(ext4_inode_ref_t *inode_ref, uint32_t iblock,
    457457    ext4_extent_path_t **ret_path)
    458458{
     
    475475        /* Walk through the extent tree */
    476476        uint16_t pos = 0;
    477         int rc;
     477        errno_t rc;
    478478        while (ext4_extent_header_get_depth(eh) != 0) {
    479479                /* Search index in index node by iblock */
     
    515515        ;
    516516
    517         int rc2 = EOK;
     517        errno_t rc2 = EOK;
    518518
    519519        /*
     
    543543 *
    544544 */
    545 static int ext4_extent_release(ext4_inode_ref_t *inode_ref,
     545static errno_t ext4_extent_release(ext4_inode_ref_t *inode_ref,
    546546    ext4_extent_t *extent)
    547547{
     
    565565 *
    566566 */
    567 static int ext4_extent_release_branch(ext4_inode_ref_t *inode_ref,
     567static errno_t ext4_extent_release_branch(ext4_inode_ref_t *inode_ref,
    568568                ext4_extent_index_t *index)
    569569{
     
    571571       
    572572        block_t* block;
    573         int rc = block_get(&block, inode_ref->fs->device, fblock, BLOCK_FLAGS_NONE);
     573        errno_t rc = block_get(&block, inode_ref->fs->device, fblock, BLOCK_FLAGS_NONE);
    574574        if (rc != EOK)
    575575                return rc;
     
    618618 *
    619619 */
    620 int ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref,
     620errno_t ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref,
    621621    uint32_t iblock_from)
    622622{
    623623        /* Find the first extent to modify */
    624624        ext4_extent_path_t *path;
    625         int rc = ext4_extent_find_extent(inode_ref, iblock_from, &path);
     625        errno_t rc = ext4_extent_find_extent(inode_ref, iblock_from, &path);
    626626        if (rc != EOK)
    627627                return rc;
     
    736736        ;
    737737
    738         int rc2 = EOK;
     738        errno_t rc2 = EOK;
    739739
    740740        /*
     
    767767 *
    768768 */
    769 static int ext4_extent_append_extent(ext4_inode_ref_t *inode_ref,
     769static errno_t ext4_extent_append_extent(ext4_inode_ref_t *inode_ref,
    770770    ext4_extent_path_t *path, uint32_t iblock)
    771771{
     
    785785                        /* Full node - allocate block for new one */
    786786                        uint32_t fblock;
    787                         int rc = ext4_balloc_alloc_block(inode_ref, &fblock);
     787                        errno_t rc = ext4_balloc_alloc_block(inode_ref, &fblock);
    788788                        if (rc != EOK)
    789789                                return rc;
     
    863863        if (entries == limit) {
    864864                uint32_t new_fblock;
    865                 int rc = ext4_balloc_alloc_block(inode_ref, &new_fblock);
     865                errno_t rc = ext4_balloc_alloc_block(inode_ref, &new_fblock);
    866866                if (rc != EOK)
    867867                        return rc;
     
    964964 *
    965965 */
    966 int ext4_extent_append_block(ext4_inode_ref_t *inode_ref, uint32_t *iblock,
     966errno_t ext4_extent_append_block(ext4_inode_ref_t *inode_ref, uint32_t *iblock,
    967967    uint32_t *fblock, bool update_size)
    968968{
     
    982982        /* Load the nearest leaf (with extent) */
    983983        ext4_extent_path_t *path;
    984         int rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path);
     984        errno_t rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path);
    985985        if (rc != EOK)
    986986                return rc;
     
    10881088        ;
    10891089
    1090         int rc2 = EOK;
     1090        errno_t rc2 = EOK;
    10911091
    10921092        /* Set return values */
Note: See TracChangeset for help on using the changeset viewer.