Changeset f7d90eb in mainline for uspace/srv/fs/exfat/exfat_fat.c
- Timestamp:
- 2011-08-14T07:44:32Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a18bd22
- Parents:
- 7be14db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_fat.c
r7be14db rf7d90eb 476 476 } 477 477 478 int bitmap_is_free(exfat_bs_t *bs, devmap_handle_t devmap_handle, 479 exfat_cluster_t clst) 480 { 481 /* TODO */ 482 return EOK; 483 } 484 485 int bitmap_set_clusters(exfat_bs_t *bs, devmap_handle_t devmap_handle, 486 exfat_cluster_t firstc, exfat_cluster_t count) 487 { 488 /* TODO */ 489 return EOK; 490 } 491 492 478 493 int bitmap_alloc_clusters(exfat_bs_t *bs, devmap_handle_t devmap_handle, 479 494 exfat_cluster_t *firstc, exfat_cluster_t count) 480 495 { 481 /* TODO */ 482 return EOK; 496 exfat_cluster_t startc, endc; 497 startc = EXFAT_CLST_FIRST; 498 499 while (startc < DATA_CNT(bs)+2) { 500 if (bitmap_is_free(bs, devmap_handle, startc) == EOK) { 501 endc = startc+1; 502 while (bitmap_is_free(bs, devmap_handle, endc) == EOK) { 503 if ((endc - startc)+1 == count){ 504 *firstc = startc; 505 return bitmap_set_clusters(bs, devmap_handle, startc, count); 506 } 507 else 508 endc++; 509 } 510 startc = endc+1; 511 } 512 else 513 startc++; 514 } 515 return ENOSPC; 483 516 } 484 517
Note:
See TracChangeset
for help on using the changeset viewer.