Changeset e32b65a in mainline
- Timestamp:
- 2008-12-16T17:18:29Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 699743c
- Parents:
- f0c9aff
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
rf0c9aff re32b65a 390 390 unsigned dps; 391 391 unsigned blocks; 392 fat_cluster_t mcl, lcl; 393 int rc; 392 394 393 395 futex_down(&childp->lock); … … 442 444 * We need to grow the parent in order to create a new unused dentry. 443 445 */ 444 futex_up(&parentp->idx->lock); 445 return ENOTSUP; /* XXX */ 446 if (parentp->idx->pfc == FAT_CLST_ROOT) { 447 /* Can't grow the root directory. */ 448 futex_up(&parentp->idx->lock); 449 return ENOSPC; 450 } 451 rc = fat_alloc_clusters(bs, parentp->idx->dev_handle, 1, &mcl, &lcl); 452 if (rc != EOK) { 453 futex_up(&parentp->idx->lock); 454 return rc; 455 } 456 fat_append_clusters(bs, parentp, mcl); 457 b = fat_block_get(bs, parentp, i, BLOCK_FLAGS_NOREAD); 458 d = (fat_dentry_t *)b->data; 459 /* 460 * Clear all dentries in the block except for the first one (the first 461 * dentry will be cleared in the next step). 462 */ 463 memset(d + 1, 0, bps - sizeof(fat_dentry_t)); 446 464 447 465 hit: … … 449 467 * At this point we only establish the link between the parent and the 450 468 * child. The dentry, except of the name and the extension, will remain 451 * uninitialized until the the corresponding node is synced. Thus the452 * validdentry data is kept in the child node structure.469 * uninitialized until the corresponding node is synced. Thus the valid 470 * dentry data is kept in the child node structure. 453 471 */ 454 472 memset(d, 0, sizeof(fat_dentry_t));
Note:
See TracChangeset
for help on using the changeset viewer.