Changeset a46e56b in mainline for uspace/srv/fs/mfs/mfs_ops.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_ops.c

    r3e242d2 ra46e56b  
    837837        struct mfs_ino_info *ino_i;
    838838        size_t len, bytes = 0;
    839         cap_call_handle_t callid;
     839        cap_call_handle_t chandle;
    840840
    841841        mnode = fn->data;
    842842        ino_i = mnode->ino_i;
    843843
    844         if (!async_data_read_receive(&callid, &len)) {
     844        if (!async_data_read_receive(&chandle, &len)) {
    845845                rc = EINVAL;
    846846                goto out_error;
     
    869869
    870870                rc = mfs_node_put(fn);
    871                 async_answer_0(callid, rc != EOK ? rc : ENOENT);
     871                async_answer_0(chandle, rc != EOK ? rc : ENOENT);
    872872                return rc;
    873873found:
    874                 async_data_read_finalize(callid, d_info.d_name,
     874                async_data_read_finalize(chandle, d_info.d_name,
    875875                    str_size(d_info.d_name) + 1);
    876876                bytes = ((pos - spos) + 1);
     
    881881                        /* Trying to read beyond the end of file */
    882882                        bytes = 0;
    883                         (void) async_data_read_finalize(callid, NULL, 0);
     883                        (void) async_data_read_finalize(chandle, NULL, 0);
    884884                        goto out_success;
    885885                }
     
    903903                        }
    904904                        memset(buf, 0, sizeof(sbi->block_size));
    905                         async_data_read_finalize(callid,
     905                        async_data_read_finalize(chandle,
    906906                            buf + pos % sbi->block_size, bytes);
    907907                        free(buf);
     
    913913                        goto out_error;
    914914
    915                 async_data_read_finalize(callid, b->data +
     915                async_data_read_finalize(chandle, b->data +
    916916                    pos % sbi->block_size, bytes);
    917917
     
    928928out_error:
    929929        tmp = mfs_node_put(fn);
    930         async_answer_0(callid, tmp != EOK ? tmp : rc);
     930        async_answer_0(chandle, tmp != EOK ? tmp : rc);
    931931        return tmp != EOK ? tmp : rc;
    932932}
     
    946946                return ENOENT;
    947947
    948         cap_call_handle_t callid;
     948        cap_call_handle_t chandle;
    949949        size_t len;
    950950
    951         if (!async_data_write_receive(&callid, &len)) {
     951        if (!async_data_write_receive(&chandle, &len)) {
    952952                r = EINVAL;
    953953                goto out_err;
     
    992992                memset(b->data, 0, sbi->block_size);
    993993
    994         async_data_write_finalize(callid, b->data + (pos % bs), bytes);
     994        async_data_write_finalize(chandle, b->data + (pos % bs), bytes);
    995995        b->dirty = true;
    996996
     
    10121012out_err:
    10131013        mfs_node_put(fn);
    1014         async_answer_0(callid, r);
     1014        async_answer_0(chandle, r);
    10151015        return r;
    10161016}
Note: See TracChangeset for help on using the changeset viewer.