Changeset 9dc6083 in mainline for uspace/srv/fs/mfs/mfs_ops.c


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

Implement statfs operation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_ops.c

    r66366470 r9dc6083  
    6464static int mfs_check_sanity(struct mfs_sb_info *sbi);
    6565static bool is_power_of_two(uint32_t n);
    66 static unsigned int mfs_size_block(fs_node_t *fsnode);
     66static long mfs_size_block(service_id_t service_id);
    6767
    6868static hash_table_t open_nodes;
     
    11381138}
    11391139
    1140 static unsigned int
    1141 mfs_size_block(fs_node_t *fsnode)
    1142 {
    1143         if ( NULL == fsnode )
    1144                 return 0;
    1145         /* Get block size from superblock */
    1146         return 512;
     1140static long
     1141mfs_size_block(service_id_t service_id)
     1142{
     1143        long block_size;
     1144
     1145        struct mfs_instance *inst;
     1146        int rc = mfs_instance_get(service_id, &inst);
     1147        if (rc != EOK)
     1148                return rc;
     1149        if (NULL == inst)
     1150                return ENOENT;
     1151        block_size = inst->sbi->block_size;     
     1152        return block_size;
    11471153}
    11481154
Note: See TracChangeset for help on using the changeset viewer.