Changeset 4f1c0b4 in mainline for uspace/srv/fs/fat/fat_ops.c


Ignore:
Timestamp:
2008-11-05T22:28:54Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9d20ea8
Parents:
8334a427
Message:

Extend _fat_blcks_get() to fat_cluster_walk(). Use fat_cluster_walk() to
implement fat_clusters_get() and _fat_block_get().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    r8334a427 r4f1c0b4  
    114114        fat_node_t *nodep = NULL;
    115115        unsigned bps;
     116        unsigned spc;
    116117        unsigned dps;
    117118
     
    165166        bs = block_bb_get(idxp->dev_handle);
    166167        bps = uint16_t_le2host(bs->bps);
     168        spc = bs->spc;
    167169        dps = bps / sizeof(fat_dentry_t);
    168170
     
    185187                 * size of the directory by walking the FAT.
    186188                 */
    187                 nodep->size = bps * _fat_blcks_get(bs, idxp->dev_handle,
    188                     uint16_t_le2host(d->firstc), NULL);
     189                nodep->size = bps * spc * fat_clusters_get(bs, idxp->dev_handle,
     190                    uint16_t_le2host(d->firstc));
    189191        } else {
    190192                nodep->type = FAT_FILE;
Note: See TracChangeset for help on using the changeset viewer.