Ignore:
File:
1 edited

Legend:

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

    rd1538a1 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.