Changeset a46e56b in mainline for uspace/srv/fs/fat/fat_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/fat/fat_ops.c

    r3e242d2 ra46e56b  
    12261226        nodep = FAT_NODE(fn);
    12271227
    1228         cap_call_handle_t callid;
     1228        cap_call_handle_t chandle;
    12291229        size_t len;
    1230         if (!async_data_read_receive(&callid, &len)) {
     1230        if (!async_data_read_receive(&chandle, &len)) {
    12311231                fat_node_put(fn);
    1232                 async_answer_0(callid, EINVAL);
     1232                async_answer_0(chandle, EINVAL);
    12331233                return EINVAL;
    12341234        }
     
    12451245                        /* reading beyond the EOF */
    12461246                        bytes = 0;
    1247                         (void) async_data_read_finalize(callid, NULL, 0);
     1247                        (void) async_data_read_finalize(chandle, NULL, 0);
    12481248                } else {
    12491249                        bytes = min(len, BPS(bs) - pos % BPS(bs));
     
    12531253                        if (rc != EOK) {
    12541254                                fat_node_put(fn);
    1255                                 async_answer_0(callid, rc);
     1255                                async_answer_0(chandle, rc);
    12561256                                return rc;
    12571257                        }
    1258                         (void) async_data_read_finalize(callid,
     1258                        (void) async_data_read_finalize(chandle,
    12591259                            b->data + pos % BPS(bs), bytes);
    12601260                        rc = block_put(b);
     
    12911291err:
    12921292                (void) fat_node_put(fn);
    1293                 async_answer_0(callid, rc);
     1293                async_answer_0(chandle, rc);
    12941294                return rc;
    12951295
     
    12991299                        goto err;
    13001300                rc = fat_node_put(fn);
    1301                 async_answer_0(callid, rc != EOK ? rc : ENOENT);
     1301                async_answer_0(chandle, rc != EOK ? rc : ENOENT);
    13021302                *rbytes = 0;
    13031303                return rc != EOK ? rc : ENOENT;
     
    13081308                if (rc != EOK)
    13091309                        goto err;
    1310                 (void) async_data_read_finalize(callid, name,
     1310                (void) async_data_read_finalize(chandle, name,
    13111311                    str_size(name) + 1);
    13121312                bytes = (pos - spos) + 1;
     
    13381338        nodep = FAT_NODE(fn);
    13391339
    1340         cap_call_handle_t callid;
     1340        cap_call_handle_t chandle;
    13411341        size_t len;
    1342         if (!async_data_write_receive(&callid, &len)) {
     1342        if (!async_data_write_receive(&chandle, &len)) {
    13431343                (void) fat_node_put(fn);
    1344                 async_answer_0(callid, EINVAL);
     1344                async_answer_0(chandle, EINVAL);
    13451345                return EINVAL;
    13461346        }
     
    13701370                if (rc != EOK) {
    13711371                        (void) fat_node_put(fn);
    1372                         async_answer_0(callid, rc);
     1372                        async_answer_0(chandle, rc);
    13731373                        return rc;
    13741374                }
     
    13761376                if (rc != EOK) {
    13771377                        (void) fat_node_put(fn);
    1378                         async_answer_0(callid, rc);
     1378                        async_answer_0(chandle, rc);
    13791379                        return rc;
    13801380                }
    1381                 (void) async_data_write_finalize(callid,
     1381                (void) async_data_write_finalize(chandle,
    13821382                    b->data + pos % BPS(bs), bytes);
    13831383                b->dirty = true;                /* need to sync block */
     
    14091409                        /* could not allocate a chain of nclsts clusters */
    14101410                        (void) fat_node_put(fn);
    1411                         async_answer_0(callid, rc);
     1411                        async_answer_0(chandle, rc);
    14121412                        return rc;
    14131413                }
     
    14171417                        (void) fat_free_clusters(bs, service_id, mcl);
    14181418                        (void) fat_node_put(fn);
    1419                         async_answer_0(callid, rc);
     1419                        async_answer_0(chandle, rc);
    14201420                        return rc;
    14211421                }
     
    14251425                        (void) fat_free_clusters(bs, service_id, mcl);
    14261426                        (void) fat_node_put(fn);
    1427                         async_answer_0(callid, rc);
     1427                        async_answer_0(chandle, rc);
    14281428                        return rc;
    14291429                }
    1430                 (void) async_data_write_finalize(callid,
     1430                (void) async_data_write_finalize(chandle,
    14311431                    b->data + pos % BPS(bs), bytes);
    14321432                b->dirty = true;                /* need to sync block */
Note: See TracChangeset for help on using the changeset viewer.