Changeset d0a1e9b6 in mainline


Ignore:
Timestamp:
2013-07-12T07:21:46Z (11 years ago)
Author:
Manuele Conti <conti.ma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
049d68b
Parents:
e8f0158
Message:

Update implementation size, total, free block operations like new stucture statfs.

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/fs/libfs.h

    re8f0158 rd0a1e9b6  
    9393        bool (* is_file)(fs_node_t *);
    9494        service_id_t (* service_get)(fs_node_t *);
    95         long (* size_block)(service_id_t);
    96         long (* total_block)(service_id_t);
    97         long (* free_block)(service_id_t);
     95        uint32_t (* size_block)(service_id_t);
     96        uint64_t (* total_block)(service_id_t);
     97        uint64_t (* free_block)(service_id_t);
    9898} libfs_ops_t;
    9999
  • uspace/srv/fs/exfat/exfat_ops.c

    re8f0158 rd0a1e9b6  
    8989static bool exfat_is_file(fs_node_t *node);
    9090static service_id_t exfat_service_get(fs_node_t *node);
    91 static long exfat_size_block(service_id_t);
     91static uint32_t exfat_size_block(service_id_t);
    9292
    9393/*
     
    913913}
    914914
    915 long exfat_size_block(service_id_t service_id)
     915uint32_t exfat_size_block(service_id_t service_id)
    916916{
    917917        exfat_bs_t *bs;
  • uspace/srv/fs/ext4fs/ext4fs_ops.c

    re8f0158 rd0a1e9b6  
    101101static bool ext4fs_is_file(fs_node_t *node);
    102102static service_id_t ext4fs_service_get(fs_node_t *node);
    103 static long ext4fs_size_block(service_id_t);
    104 static long ext4fs_total_block(service_id_t);
    105 static long ext4fs_free_block(service_id_t);
     103static uint32_t ext4fs_size_block(service_id_t);
     104static uint64_t ext4fs_total_block(service_id_t);
     105static uint64_t ext4fs_free_block(service_id_t);
    106106
    107107/* Static variables */
     
    841841}
    842842
    843 long ext4fs_size_block(service_id_t service_id)
     843uint32_t ext4fs_size_block(service_id_t service_id)
    844844{
    845845        ext4fs_instance_t *inst;
     
    856856}
    857857
    858 long ext4fs_total_block(service_id_t service_id)
     858uint64_t ext4fs_total_block(service_id_t service_id)
    859859{
    860860        ext4fs_instance_t *inst;
     
    866866
    867867        ext4_superblock_t *sb = inst->filesystem->superblock;
    868         uint32_t block_count = ext4_superblock_get_blocks_count(sb);
     868        uint64_t block_count = ext4_superblock_get_blocks_count(sb);
    869869
    870870        return block_count;
    871871}
    872872
    873 long ext4fs_free_block(service_id_t service_id)
     873uint64_t ext4fs_free_block(service_id_t service_id)
    874874{
    875875        ext4fs_instance_t *inst;
     
    881881
    882882        ext4_superblock_t *sb = inst->filesystem->superblock;
    883         uint32_t block_count = ext4_superblock_get_free_blocks_count(sb);
     883        uint64_t block_count = ext4_superblock_get_free_blocks_count(sb);
    884884
    885885        return block_count;
  • uspace/srv/fs/fat/fat_ops.c

    re8f0158 rd0a1e9b6  
    9191static bool fat_is_file(fs_node_t *node);
    9292static service_id_t fat_service_get(fs_node_t *node);
    93 static long fat_size_block(service_id_t);
     93static uint32_t fat_size_block(service_id_t);
    9494
    9595/*
     
    844844}
    845845
    846 long fat_size_block(service_id_t service_id)
     846uint32_t fat_size_block(service_id_t service_id)
    847847{
    848848        fat_bs_t *bs;
  • uspace/srv/fs/mfs/mfs_ops.c

    re8f0158 rd0a1e9b6  
    6464static int mfs_check_sanity(struct mfs_sb_info *sbi);
    6565static bool is_power_of_two(uint32_t n);
    66 static long mfs_size_block(service_id_t service_id);
    67 static long mfs_total_block(service_id_t service_id);
    68 static long mfs_free_block(service_id_t service_id);
     66static uint32_t mfs_size_block(service_id_t service_id);
     67static uint64_t mfs_total_block(service_id_t service_id);
     68static uint64_t mfs_free_block(service_id_t service_id);
    6969
    7070static hash_table_t open_nodes;
     
    11351135}
    11361136
    1137 static long
     1137static uint32_t
    11381138mfs_size_block(service_id_t service_id)
    11391139{
    1140         long block_size;
     1140        uint32_t block_size;
    11411141
    11421142        struct mfs_instance *inst;
     
    11521152}
    11531153
    1154 static long
     1154static uint64_t
    11551155mfs_total_block(service_id_t service_id)
    11561156{
    1157         long block_total;
     1157        uint64_t block_total;
    11581158       
    11591159        struct mfs_instance *inst;
     
    11651165                return ENOENT;
    11661166       
    1167         block_total = inst->sbi->nzones;
     1167        block_total = (uint64_t)inst->sbi->nzones;
    11681168
    11691169        return block_total;
    11701170}
    11711171
    1172 static long
     1172static uint64_t
    11731173mfs_free_block(service_id_t service_id)
    11741174{
     
    11851185        mfs_count_free_zones(inst, &block_free);
    11861186
    1187         return (long)block_free;
     1187        return (uint64_t)block_free;
    11881188}
    11891189
  • uspace/srv/fs/udf/udf_ops.c

    re8f0158 rd0a1e9b6  
    249249}
    250250
    251 static long udf_size_block(service_id_t service_id)
     251static uint32_t udf_size_block(service_id_t service_id)
    252252{
    253253        udf_instance_t *instance;
Note: See TracChangeset for help on using the changeset viewer.