Changeset 8d6a41c in mainline for uspace/srv/vfs/vfs_ops.c


Ignore:
Timestamp:
2011-11-05T13:00:34Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45ffe9f
Parents:
72fda53
Message:

Remove the mtab_list_ent structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_ops.c

    r72fda53 r8d6a41c  
    362362
    363363        /* 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) {
    366366                async_answer_0(callid, ENOMEM);
    367367                async_answer_0(rid, ENOMEM);
     
    371371                return;
    372372        }
    373 
    374         mtab_ent_t *mtab_ent = &mtab_list_ent->mtab_ent;
    375373
    376374        mtab_ent->fs_handle = fs_handle;
     
    381379        mtab_ent->instance = instance;
    382380
    383         link_initialize(&mtab_list_ent->link);
     381        link_initialize(&mtab_ent->link);
    384382
    385383        fibril_mutex_lock(&mtab_list_lock);
    386         list_append(&mtab_list_ent->link, &mtab_list);
     384        list_append(&mtab_ent->link, &mtab_list);
    387385        mtab_size++;
    388386        fibril_mutex_unlock(&mtab_list_lock);
     
    538536
    539537        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,
    541539                    link);
    542540
    543                 mtab_ent_t *mtab_ent = &ent->mtab_ent;
    544 
    545541                if (str_cmp(mtab_ent->mp, mp) == 0) {
    546                         list_remove(&ent->link);
     542                        list_remove(&mtab_ent->link);
    547543                        mtab_size--;
    548                         free(ent);
     544                        free(mtab_ent);
    549545                        found = 1;
    550546                        break;
     
    13631359
    13641360        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,
    13661362                    link);
    1367 
    1368                 mtab_ent_t *mtab_ent = &ent->mtab_ent;
    13691363
    13701364                rc = ENOTSUP;
Note: See TracChangeset for help on using the changeset viewer.