Changeset e478b2a4 in mainline


Ignore:
Timestamp:
2008-11-24T22:36:56Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
49df572
Parents:
08b6836
Message:

fat_alloc_clusters() fixes.

File:
1 edited

Legend:

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

    r08b6836 re478b2a4  
    286286}
    287287
    288 /** Allocate clusters in FAT1.
     288/** Allocate clusters in all copies of FAT.
    289289 *
    290290 * This function will attempt to allocate the requested number of clusters in
    291  * the first FAT instance.  The FAT will be altered so that the allocated
     291 * all instances of the FAT.  The FAT will be altered so that the allocated
    292292 * clusters form an independent chain (i.e. a chain which does not belong to any
    293293 * file yet).
     
    316316
    317317        lifo = (fat_cluster_t *) malloc(nclsts * sizeof(fat_cluster_t));
    318         if (lifo)
     318        if (!lifo)
    319319                return ENOMEM;
    320320       
     
    327327         */
    328328        futex_down(&fat_alloc_lock);
    329         for (b = 0, cl = 0; b < sf; blk++) {
    330                 blk = block_get(dev_handle, rscnt + b, BLOCK_FLAGS_NOREAD);
     329        for (b = 0, cl = 0; b < sf; b++) {
     330                blk = block_get(dev_handle, rscnt + b, BLOCK_FLAGS_NONE);
    331331                for (c = 0; c < bps / sizeof(fat_cluster_t); c++, cl++) {
    332332                        fat_cluster_t *clst = (fat_cluster_t *)blk->data + c;
Note: See TracChangeset for help on using the changeset viewer.