Changeset b0247bac in mainline
- Timestamp:
- 2008-10-27T22:38:56Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5cf723b
- Parents:
- 0951495
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r0951495 rb0247bac 267 267 bps = uint16_t_le2host(FAT_BS(bb)->bps); 268 268 dps = bps / sizeof(fat_dentry_t); 269 blocks = parentp->size / bps + (parentp->size % bps != 0);269 blocks = parentp->size / bps; 270 270 for (i = 0; i < blocks; i++) { 271 unsigned dentries;272 273 271 b = fat_block_get(bb->data, parentp, i); 274 dentries = (i == blocks - 1) ? 275 parentp->size % sizeof(fat_dentry_t) : 276 dps; 277 for (j = 0; j < dentries; j++) { 272 for (j = 0; j < dps; j++) { 278 273 d = ((fat_dentry_t *)b->data) + j; 279 274 switch (fat_classify_dentry(d)) { … … 356 351 if (nodep->type != FAT_DIRECTORY) 357 352 return false; 358 353 359 354 futex_down(&nodep->idx->lock); 360 355 bb = block_get(nodep->idx->dev_handle, BS_BLOCK, BS_SIZE); … … 362 357 dps = bps / sizeof(fat_dentry_t); 363 358 364 blocks = nodep->size / bps + (nodep->size % bps != 0);359 blocks = nodep->size / bps; 365 360 366 361 for (i = 0; i < blocks; i++) { 367 unsigned dentries;368 362 fat_dentry_t *d; 369 363 370 364 b = fat_block_get(bb->data, nodep, i); 371 dentries = (i == blocks - 1) ? 372 nodep->size % sizeof(fat_dentry_t) : 373 dps; 374 for (j = 0; j < dentries; j++) { 365 for (j = 0; j < dps; j++) { 375 366 d = ((fat_dentry_t *)b->data) + j; 376 367 switch (fat_classify_dentry(d)) {
Note:
See TracChangeset
for help on using the changeset viewer.