Changeset 6b6f394d in mainline


Ignore:
Timestamp:
2013-07-29T19:53:42Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
38eb0d7
Parents:
736b07b
Message:

exfat: fix free block counting when the bitmap is smaller than one sector

File:
1 edited

Legend:

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

    r736b07b r6b6f394d  
    955955        bmap_node = (exfat_node_t *) node->data;
    956956
    957         for (sector = 0; sector < bmap_node->size / BPS(bs); ++sector) {
     957        unsigned const bmap_sectors = ROUND_UP(bmap_node->size, BPS(bs)) /
     958            BPS(bs);
     959
     960        for (sector = 0; sector < bmap_sectors; ++sector) {
    958961
    959962                block_t *block;
     
    961964                unsigned bit;
    962965
    963                 rc = exfat_block_get_by_clst(&block, bs, service_id,
    964                     bmap_node->fragmented, bmap_node->firstc, NULL, sector,
     966                rc = exfat_block_get(&block, bs, bmap_node, sector,
    965967                    BLOCK_FLAGS_NONE);
    966968                if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.