Changeset a46e56b in mainline for uspace/srv/fs/exfat/exfat_ops.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (7 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/exfat/exfat_ops.c

    r3e242d2 ra46e56b  
    13371337        nodep = EXFAT_NODE(fn);
    13381338
    1339         cap_call_handle_t callid;
     1339        cap_call_handle_t chandle;
    13401340        size_t len;
    1341         if (!async_data_read_receive(&callid, &len)) {
     1341        if (!async_data_read_receive(&chandle, &len)) {
    13421342                exfat_node_put(fn);
    1343                 async_answer_0(callid, EINVAL);
     1343                async_answer_0(chandle, EINVAL);
    13441344                return EINVAL;
    13451345        }
     
    13561356                        /* reading beyond the EOF */
    13571357                        bytes = 0;
    1358                         (void) async_data_read_finalize(callid, NULL, 0);
     1358                        (void) async_data_read_finalize(chandle, NULL, 0);
    13591359                } else {
    13601360                        bytes = min(len, BPS(bs) - pos % BPS(bs));
     
    13641364                        if (rc != EOK) {
    13651365                                exfat_node_put(fn);
    1366                                 async_answer_0(callid, rc);
     1366                                async_answer_0(chandle, rc);
    13671367                                return rc;
    13681368                        }
    1369                         (void) async_data_read_finalize(callid,
     1369                        (void) async_data_read_finalize(chandle,
    13701370                            b->data + pos % BPS(bs), bytes);
    13711371                        rc = block_put(b);
     
    13771377        } else {
    13781378                if (nodep->type != EXFAT_DIRECTORY) {
    1379                         async_answer_0(callid, ENOTSUP);
     1379                        async_answer_0(chandle, ENOTSUP);
    13801380                        return ENOTSUP;
    13811381                }
     
    14111411err:
    14121412                (void) exfat_node_put(fn);
    1413                 async_answer_0(callid, rc);
     1413                async_answer_0(chandle, rc);
    14141414                return rc;
    14151415
     
    14191419                        goto err;
    14201420                rc = exfat_node_put(fn);
    1421                 async_answer_0(callid, rc != EOK ? rc : ENOENT);
     1421                async_answer_0(chandle, rc != EOK ? rc : ENOENT);
    14221422                *rbytes = 0;
    14231423                return rc != EOK ? rc : ENOENT;
     
    14281428                if (rc != EOK)
    14291429                        goto err;
    1430                 (void) async_data_read_finalize(callid, name,
     1430                (void) async_data_read_finalize(chandle, name,
    14311431                    str_size(name) + 1);
    14321432                bytes = (pos - spos) + 1;
     
    14811481        nodep = EXFAT_NODE(fn);
    14821482
    1483         cap_call_handle_t callid;
     1483        cap_call_handle_t chandle;
    14841484        size_t len;
    1485         if (!async_data_write_receive(&callid, &len)) {
     1485        if (!async_data_write_receive(&chandle, &len)) {
    14861486                (void) exfat_node_put(fn);
    1487                 async_answer_0(callid, EINVAL);
     1487                async_answer_0(chandle, EINVAL);
    14881488                return EINVAL;
    14891489        }
     
    15101510                        /* could not expand node */
    15111511                        (void) exfat_node_put(fn);
    1512                         async_answer_0(callid, rc);
     1512                        async_answer_0(chandle, rc);
    15131513                        return rc;
    15141514                }
     
    15291529        if (rc != EOK) {
    15301530                (void) exfat_node_put(fn);
    1531                 async_answer_0(callid, rc);
    1532                 return rc;
    1533         }
    1534 
    1535         (void) async_data_write_finalize(callid,
     1531                async_answer_0(chandle, rc);
     1532                return rc;
     1533        }
     1534
     1535        (void) async_data_write_finalize(chandle,
    15361536            b->data + pos % BPS(bs), bytes);
    15371537        b->dirty = true;                /* need to sync block */
Note: See TracChangeset for help on using the changeset viewer.