Changeset 7ea69a6 in mainline for uspace/lib/ext2


Ignore:
Timestamp:
2011-03-23T10:40:17Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6f50bb0
Parents:
f2d665b4
Message:

Support for sparse files and fixed handling of end of file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext2/libext2_filesystem.c

    rf2d665b4 r7ea69a6  
    297297 * of the given inode is located.
    298298 *
     299 * @param fblock the number of filesystem block, or 0 if no such block is allocated yet
     300 *
    299301 * @return              EOK on success or negative error code on failure
    300302 */
     
    315317        if (iblock < EXT2_INODE_DIRECT_BLOCKS) {
    316318                current_block = ext2_inode_get_direct_block(inode, (uint32_t)iblock);
    317                 if (current_block == 0) {
    318                         return EIO;
    319                 }
    320319                *fblock = current_block;
    321320                return EOK;
     
    365364               
    366365                if (current_block == 0) {
    367                         return EIO;
     366                        *fblock = 0;
     367                        return EOK;
    368368                }
    369369               
Note: See TracChangeset for help on using the changeset viewer.