Changeset 5930e3f in mainline for uspace/srv/fs/ext4fs/ext4fs_ops.c


Ignore:
Timestamp:
2013-07-09T06:06:37Z (12 years ago)
Author:
Manuele Conti <conti.ma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
951f32ce
Parents:
11baebb
Message:

Implement size_block function for ext4fs.
Fix typo in libfs VFS_OUT_STATFS operation.
Remove all debug code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/ext4fs/ext4fs_ops.c

    r11baebb r5930e3f  
    101101static bool ext4fs_is_file(fs_node_t *node);
    102102static service_id_t ext4fs_service_get(fs_node_t *node);
     103static long ext4fs_size_block(service_id_t);
    103104
    104105/* Static variables */
     
    836837        ext4fs_node_t *enode = EXT4FS_NODE(fn);
    837838        return enode->instance->service_id;
     839}
     840
     841long ext4fs_size_block(service_id_t service_id)
     842{
     843        ext4fs_instance_t *inst;
     844        int rc = ext4fs_instance_get(service_id, &inst);
     845        if (rc != EOK)
     846                return rc;
     847        if (NULL == inst)
     848                return ENOENT;
     849        ext4_superblock_t *sb = inst->filesystem->superblock;
     850        uint32_t block_size = ext4_superblock_get_block_size(sb);
     851        return block_size;
    838852}
    839853
     
    857871        .is_directory = ext4fs_is_directory,
    858872        .is_file = ext4fs_is_file,
    859         .service_get = ext4fs_service_get
     873        .service_get = ext4fs_service_get,
     874        .size_block = ext4fs_size_block
    860875};
    861876
Note: See TracChangeset for help on using the changeset viewer.