Changeset e478b2a4 in mainline
- Timestamp:
- 2008-11-24T22:36:56Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49df572
- Parents:
- 08b6836
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
r08b6836 re478b2a4 286 286 } 287 287 288 /** Allocate clusters in FAT1.288 /** Allocate clusters in all copies of FAT. 289 289 * 290 290 * 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 allocated291 * all instances of the FAT. The FAT will be altered so that the allocated 292 292 * clusters form an independent chain (i.e. a chain which does not belong to any 293 293 * file yet). … … 316 316 317 317 lifo = (fat_cluster_t *) malloc(nclsts * sizeof(fat_cluster_t)); 318 if ( lifo)318 if (!lifo) 319 319 return ENOMEM; 320 320 … … 327 327 */ 328 328 futex_down(&fat_alloc_lock); 329 for (b = 0, cl = 0; b < sf; b lk++) {330 blk = block_get(dev_handle, rscnt + b, BLOCK_FLAGS_NO READ);329 for (b = 0, cl = 0; b < sf; b++) { 330 blk = block_get(dev_handle, rscnt + b, BLOCK_FLAGS_NONE); 331 331 for (c = 0; c < bps / sizeof(fat_cluster_t); c++, cl++) { 332 332 fat_cluster_t *clst = (fat_cluster_t *)blk->data + c;
Note:
See TracChangeset
for help on using the changeset viewer.