Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5f0e16e4 in mainline


Ignore:
Timestamp:
2011-08-14T08:34:38Z (10 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master
Children:
5d5863c
Parents:
245b7945
Message:

exFAT: implement bitmap_replicate_clusters

File:
1 edited

Legend:

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

    r245b7945 r5f0e16e4  
    595595int bitmap_replicate_clusters(exfat_bs_t *bs, exfat_node_t *nodep)
    596596{
    597         /* TODO */
    598         return EOK;
     597        int rc;
     598        exfat_cluster_t lastc, clst;
     599        devmap_handle_t devmap_handle = nodep->idx->devmap_handle;
     600        lastc = nodep->firstc + ROUND_UP(nodep->size, BPC(bs)) / BPC(bs) - 1;
     601
     602        for (clst = nodep->firstc; clst < lastc; clst++) {
     603                rc = exfat_set_cluster(bs, devmap_handle, clst, clst+1);
     604                if (rc != EOK)
     605                        return rc;
     606        }
     607
     608        return exfat_set_cluster(bs, devmap_handle, lastc, EXFAT_CLST_EOF);
    599609}
    600610
Note: See TracChangeset for help on using the changeset viewer.