Changeset 8a06c1b in mainline
- Timestamp:
- 2011-08-15T17:19:23Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7d78d163
- Parents:
- d9aeab3
- Location:
- uspace/srv/fs/exfat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_fat.c
rd9aeab3 r8a06c1b 194 194 int rc; 195 195 196 if (fcl < EXFAT_CLST_FIRST )196 if (fcl < EXFAT_CLST_FIRST || fcl > DATA_CNT(bs)+2) 197 197 return ELIMIT; 198 198 … … 476 476 } 477 477 478 int 479 exfat_zero_cluster(exfat_bs_t *bs, devmap_handle_t devmap_handle, exfat_cluster_t c) 480 { 481 size_t i; 482 block_t *b; 483 int rc; 484 485 for (i = 0; i < SPC(bs); i++) { 486 rc = exfat_block_get_by_clst(&b, bs, devmap_handle, false, c, NULL, i, 487 BLOCK_FLAGS_NOREAD); 488 if (rc != EOK) 489 return rc; 490 memset(b->data, 0, BPS(bs)); 491 b->dirty = true; 492 rc = block_put(b); 493 if (rc != EOK) 494 return rc; 495 } 496 497 return EOK; 498 } 499 478 500 /** Perform basic sanity checks on the file system. 479 501 * -
uspace/srv/fs/exfat/exfat_fat.h
rd9aeab3 r8a06c1b 83 83 exfat_cluster_t *, exfat_cluster_t *); 84 84 extern int exfat_free_clusters(struct exfat_bs *, devmap_handle_t, exfat_cluster_t); 85 85 extern int exfat_zero_cluster(struct exfat_bs * bs, devmap_handle_t devmap_handle, 86 exfat_cluster_t mcl); 86 87 87 88 #endif
Note:
See TracChangeset
for help on using the changeset viewer.