Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/exfat/exfat_ops.c

    r062d900 rc84146d3  
    8989static bool exfat_is_file(fs_node_t *node);
    9090static service_id_t exfat_service_get(fs_node_t *node);
     91static uint32_t exfat_size_block(service_id_t);
     92static uint64_t exfat_total_block_count(service_id_t);
     93static uint64_t exfat_free_block_count(service_id_t);
    9194
    9295/*
     
    912915}
    913916
     917uint32_t exfat_size_block(service_id_t service_id)
     918{
     919        exfat_bs_t *bs;
     920        bs = block_bb_get(service_id);
     921       
     922        return BPC(bs);
     923}
     924
     925uint64_t exfat_total_block_count(service_id_t service_id)
     926{
     927        exfat_bs_t *bs;
     928        bs = block_bb_get(service_id);
     929       
     930        uint64_t block_count = DATA_CNT(bs);
     931       
     932        return block_count;
     933}
     934
     935uint64_t exfat_free_block_count(service_id_t service_id)
     936{
     937        exfat_bs_t *bs;
     938        bs = block_bb_get(service_id);
     939       
     940        uint64_t block_count = (DATA_CNT(bs) / 100) *
     941                        bs->allocated_percent;
     942
     943        return block_count;
     944}
    914945
    915946/** libfs operations */
     
    930961        .is_directory = exfat_is_directory,
    931962        .is_file = exfat_is_file,
    932         .service_get = exfat_service_get
     963        .service_get = exfat_service_get,
     964        .size_block = exfat_size_block,
     965        .total_block_count = exfat_total_block_count,
     966        .free_block_count = exfat_free_block_count
    933967};
    934968
Note: See TracChangeset for help on using the changeset viewer.