Changeset 8d6a41c in mainline for uspace/srv/vfs/vfs_ops.c
- Timestamp:
- 2011-11-05T13:00:34Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45ffe9f
- Parents:
- 72fda53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r72fda53 r8d6a41c 362 362 363 363 /* Add the filesystem info to the list of mounted filesystems */ 364 mtab_ list_ent_t *mtab_list_ent = malloc(sizeof(mtab_list_ent_t));365 if (!mtab_ list_ent) {364 mtab_ent_t *mtab_ent = malloc(sizeof(mtab_ent_t)); 365 if (!mtab_ent) { 366 366 async_answer_0(callid, ENOMEM); 367 367 async_answer_0(rid, ENOMEM); … … 371 371 return; 372 372 } 373 374 mtab_ent_t *mtab_ent = &mtab_list_ent->mtab_ent;375 373 376 374 mtab_ent->fs_handle = fs_handle; … … 381 379 mtab_ent->instance = instance; 382 380 383 link_initialize(&mtab_ list_ent->link);381 link_initialize(&mtab_ent->link); 384 382 385 383 fibril_mutex_lock(&mtab_list_lock); 386 list_append(&mtab_ list_ent->link, &mtab_list);384 list_append(&mtab_ent->link, &mtab_list); 387 385 mtab_size++; 388 386 fibril_mutex_unlock(&mtab_list_lock); … … 538 536 539 537 list_foreach(mtab_list, cur) { 540 mtab_ list_ent_t *ent = list_get_instance(cur, mtab_list_ent_t,538 mtab_ent_t *mtab_ent = list_get_instance(cur, mtab_ent_t, 541 539 link); 542 540 543 mtab_ent_t *mtab_ent = &ent->mtab_ent;544 545 541 if (str_cmp(mtab_ent->mp, mp) == 0) { 546 list_remove(& ent->link);542 list_remove(&mtab_ent->link); 547 543 mtab_size--; 548 free( ent);544 free(mtab_ent); 549 545 found = 1; 550 546 break; … … 1363 1359 1364 1360 list_foreach(mtab_list, cur) { 1365 mtab_ list_ent_t *ent = list_get_instance(cur, mtab_list_ent_t,1361 mtab_ent_t *mtab_ent = list_get_instance(cur, mtab_ent_t, 1366 1362 link); 1367 1368 mtab_ent_t *mtab_ent = &ent->mtab_ent;1369 1363 1370 1364 rc = ENOTSUP;
Note:
See TracChangeset
for help on using the changeset viewer.