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

Changeset e8976b59 in mainline


Ignore:
Timestamp:
2011-08-15T18:08:52Z (10 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master
Children:
521550d
Parents:
75513701
Message:

exFAT: implement exfat_read_uctable

Location:
uspace/srv/fs/exfat
Files:
2 edited

Legend:

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

    r75513701 re8976b59  
    498498}
    499499
     500int
     501exfat_read_uctable(exfat_bs_t *bs, exfat_node_t *nodep, uint8_t *uctable)
     502{
     503        size_t i, blocks, count;
     504        block_t *b;
     505        int rc;
     506        blocks = ROUND_UP(nodep->size, BPS(bs))/BPS(bs);
     507        count = BPS(bs);
     508       
     509        for (i = 0; i < blocks; i++) {
     510                rc = exfat_block_get(&b, bs, nodep, i, BLOCK_FLAGS_NOREAD);
     511                if (rc != EOK)
     512                        return rc;
     513                if (i == blocks-1)
     514                        count = nodep->size - i*BPS(bs);
     515                memcpy(uctable, b->data, count);
     516                uctable += count;
     517                rc = block_put(b);
     518                if (rc != EOK)
     519                        return rc;
     520        }
     521
     522        return EOK;
     523}
     524
     525
    500526/** Perform basic sanity checks on the file system.
    501527 *
  • uspace/srv/fs/exfat/exfat_fat.h

    r75513701 re8976b59  
    8686    exfat_cluster_t mcl);
    8787
     88extern int exfat_read_uctable(struct exfat_bs *bs, struct exfat_node *nodep,
     89    uint8_t *uctable);
     90
    8891#endif
    8992
Note: See TracChangeset for help on using the changeset viewer.