Changeset b1178d0 in mainline


Ignore:
Timestamp:
2008-10-26T15:35:26Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f772105e
Parents:
0f57d0e
Message:

Implement fat_alloc_shadow_clusters().

File:
1 edited

Legend:

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

    r0f57d0e rb1178d0  
    217217}
    218218
    219 void
    220 fat_alloc_shadow_clusters(dev_handle_t dev_handle, fat_cluster_t *lifo,
     219void fat_alloc_shadow_clusters(dev_handle_t dev_handle, fat_cluster_t *lifo,
    221220    unsigned nclsts)
    222221{
    223         /* TODO */
     222        uint8_t fatcnt;
     223        uint8_t fatno;
     224        unsigned c;
     225        block_t *bb;
     226
     227        bb = block_get(dev_handle, BS_BLOCK, BS_SIZE);
     228        fatcnt = FAT_BS(bb)->fatcnt;
     229        block_put(bb);
     230       
     231        for (fatno = FAT1 + 1; fatno < fatcnt; fatno++) {
     232                for (c = 0; c < nclsts; c++) {
     233                        fat_mark_cluster(dev_handle, fatno, lifo[c],
     234                            c == 0 ? FAT_CLST_LAST1 : lifo[c - 1]);
     235                }
     236        }
    224237}
    225238
Note: See TracChangeset for help on using the changeset viewer.