Changeset 30413b31 in mainline for uspace/srv/fs/exfat/exfat_directory.c
- Timestamp:
- 2011-12-10T08:29:44Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d9f8dd13
- Parents:
- b8b1e631 (diff), 87955bfb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_directory.c
rb8b1e631 r30413b31 92 92 int rc = EOK; 93 93 94 if (di->b) 94 if (di->b) { 95 95 rc = block_put(di->b); 96 di->b = NULL; 97 } 96 98 97 99 return rc; … … 101 103 { 102 104 uint32_t i; 103 int rc ;105 int rc = EOK; 104 106 105 107 i = (di->pos * sizeof(exfat_dentry_t)) / BPS(di->bs); … … 108 110 109 111 if (di->b && di->bnum != i) { 110 block_put(di->b);112 rc = block_put(di->b); 111 113 di->b = NULL; 112 114 } … … 126 128 di->bnum = i; 127 129 } 128 return EOK;130 return rc; 129 131 } 130 132 … … 285 287 for (i = 0; i < count; i++) { 286 288 rc = exfat_directory_get(di, &de); 287 if (rc != EOK) 288 return rc; 289 if (rc != EOK) { 290 free(array); 291 return rc; 292 } 289 293 array[i] = *de; 290 294 rc = exfat_directory_next(di); … … 312 316 for (i = 0; i < count; i++) { 313 317 rc = exfat_directory_get(di, &de); 314 if (rc != EOK) 315 return rc; 318 if (rc != EOK) { 319 free(array); 320 return rc; 321 } 316 322 *de = array[i]; 317 323 di->b->dirty = true; … … 424 430 425 431 di->b->dirty = true; 426 sname += chars;427 432 } 428 433 … … 434 439 int rc, count; 435 440 exfat_dentry_t *de; 441 442 di->pos = pos; 436 443 437 444 rc = exfat_directory_get(di, &de);
Note:
See TracChangeset
for help on using the changeset viewer.