Changeset fd210de in mainline for uspace/srv
- Timestamp:
- 2009-08-13T17:26:25Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8344d0a
- Parents:
- 75a2dc08 (diff), 64cbf94 (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. - Location:
- uspace/srv
- Files:
-
- 5 edited
-
fs/fat/fat_fat.c (modified) (1 diff)
-
fs/fat/fat_fat.h (modified) (1 diff)
-
fs/fat/fat_ops.c (modified) (3 diffs)
-
ns/task.h (modified) (1 diff)
-
vfs/vfs_node.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
r75a2dc08 rfd210de 451 451 } 452 452 453 void 454 fat_zero_cluster(struct fat_bs *bs, dev_handle_t dev_handle, fat_cluster_t c) 455 { 456 int i; 457 block_t *b; 458 unsigned bps; 459 460 bps = uint16_t_le2host(bs->bps); 461 462 for (i = 0; i < bs->spc; i++) { 463 b = _fat_block_get(bs, dev_handle, c, i, BLOCK_FLAGS_NOREAD); 464 memset(b->data, 0, bps); 465 b->dirty = true; 466 block_put(b); 467 } 468 } 469 453 470 /** 454 471 * @} -
uspace/srv/fs/fat/fat_fat.h
r75a2dc08 rfd210de 84 84 extern void fat_fill_gap(struct fat_bs *, struct fat_node *, fat_cluster_t, 85 85 off_t); 86 extern void fat_zero_cluster(struct fat_bs *, dev_handle_t, fat_cluster_t); 86 87 87 88 #endif -
uspace/srv/fs/fat/fat_ops.c
r75a2dc08 rfd210de 332 332 /* idxp->lock held */ 333 333 if (flags & L_DIRECTORY) { 334 int i; 335 block_t *b; 336 337 /* 338 * Populate the new cluster with unused dentries. 339 */ 340 for (i = 0; i < bs->spc; i++) { 341 b = _fat_block_get(bs, dev_handle, mcl, i, 342 BLOCK_FLAGS_NOREAD); 343 /* mark all dentries as never-used */ 344 memset(b->data, 0, bps); 345 b->dirty = false; 346 block_put(b); 347 } 334 /* Populate the new cluster with unused dentries. */ 335 fat_zero_cluster(bs, dev_handle, mcl); 348 336 nodep->type = FAT_DIRECTORY; 349 337 nodep->firstc = mcl; … … 462 450 * We need to grow the parent in order to create a new unused dentry. 463 451 */ 464 if (parentp-> idx->pfc == FAT_CLST_ROOT) {452 if (parentp->firstc == FAT_CLST_ROOT) { 465 453 /* Can't grow the root directory. */ 466 454 fibril_mutex_unlock(&parentp->idx->lock); … … 472 460 return rc; 473 461 } 462 fat_zero_cluster(bs, parentp->idx->dev_handle, mcl); 474 463 fat_append_clusters(bs, parentp, mcl); 475 b = fat_block_get(bs, parentp, i, BLOCK_FLAGS_NOREAD); 464 parentp->size += bps * bs->spc; 465 parentp->dirty = true; /* need to sync node */ 466 b = fat_block_get(bs, parentp, i, BLOCK_FLAGS_NONE); 476 467 d = (fat_dentry_t *)b->data; 477 /*478 * Clear all dentries in the block except for the first one (the first479 * dentry will be cleared in the next step).480 */481 memset(d + 1, 0, bps - sizeof(fat_dentry_t));482 468 483 469 hit: -
uspace/srv/ns/task.h
r75a2dc08 rfd210de 35 35 36 36 #include <ipc/ipc.h> 37 #include <event.h>38 37 39 38 extern int task_init(void); 40 39 extern void process_pending_wait(void); 41 40 42 extern void wait_notification(wait_type_t et, task_id_t id);43 41 extern void wait_for_task(task_id_t id, ipc_call_t *call, ipc_callid_t callid); 44 42 -
uspace/srv/vfs/vfs_node.c
r75a2dc08 rfd210de 188 188 } 189 189 190 assert(node->size == result->size );190 assert(node->size == result->size || node->type != VFS_NODE_FILE); 191 191 assert(node->lnkcnt == result->lnkcnt); 192 192 assert(node->type == result->type || result->type == VFS_NODE_UNKNOWN);
Note:
See TracChangeset
for help on using the changeset viewer.
