Changeset a429bfb in mainline for uspace/srv/fs/fat/fat_fat.c
- Timestamp:
- 2008-10-26T18:22:03Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e17d986
- Parents:
- 8bc6fcf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
r8bc6fcf ra429bfb 286 286 for (c = 0; c < bps / sizeof(fat_cluster_t); c++, cl++) { 287 287 fat_cluster_t *clst = (fat_cluster_t *)blk->data + c; 288 if ( *clst== FAT_CLST_RES0) {288 if (uint16_t_le2host(*clst) == FAT_CLST_RES0) { 289 289 /* 290 290 * The cluster is free. Put it into our stack … … 292 292 */ 293 293 lifo[found] = cl; 294 if (found == 0) 295 *clst = FAT_CLST_LAST1; 296 else 297 *clst = lifo[found - 1]; 294 *clst = (found == 0) ? 295 host2uint16_t_le(FAT_CLST_LAST1) : 296 host2uint16_t_le(lifo[found - 1]); 298 297 blk->dirty = true; /* need to sync block */ 299 298 if (++found == nclsts) {
Note:
See TracChangeset
for help on using the changeset viewer.