Changeset a46e56b in mainline for uspace/srv/fs/fat/fat_ops.c
- Timestamp:
- 2018-03-22T06:49:35Z (7 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r3e242d2 ra46e56b 1226 1226 nodep = FAT_NODE(fn); 1227 1227 1228 cap_call_handle_t c allid;1228 cap_call_handle_t chandle; 1229 1229 size_t len; 1230 if (!async_data_read_receive(&c allid, &len)) {1230 if (!async_data_read_receive(&chandle, &len)) { 1231 1231 fat_node_put(fn); 1232 async_answer_0(c allid, EINVAL);1232 async_answer_0(chandle, EINVAL); 1233 1233 return EINVAL; 1234 1234 } … … 1245 1245 /* reading beyond the EOF */ 1246 1246 bytes = 0; 1247 (void) async_data_read_finalize(c allid, NULL, 0);1247 (void) async_data_read_finalize(chandle, NULL, 0); 1248 1248 } else { 1249 1249 bytes = min(len, BPS(bs) - pos % BPS(bs)); … … 1253 1253 if (rc != EOK) { 1254 1254 fat_node_put(fn); 1255 async_answer_0(c allid, rc);1255 async_answer_0(chandle, rc); 1256 1256 return rc; 1257 1257 } 1258 (void) async_data_read_finalize(c allid,1258 (void) async_data_read_finalize(chandle, 1259 1259 b->data + pos % BPS(bs), bytes); 1260 1260 rc = block_put(b); … … 1291 1291 err: 1292 1292 (void) fat_node_put(fn); 1293 async_answer_0(c allid, rc);1293 async_answer_0(chandle, rc); 1294 1294 return rc; 1295 1295 … … 1299 1299 goto err; 1300 1300 rc = fat_node_put(fn); 1301 async_answer_0(c allid, rc != EOK ? rc : ENOENT);1301 async_answer_0(chandle, rc != EOK ? rc : ENOENT); 1302 1302 *rbytes = 0; 1303 1303 return rc != EOK ? rc : ENOENT; … … 1308 1308 if (rc != EOK) 1309 1309 goto err; 1310 (void) async_data_read_finalize(c allid, name,1310 (void) async_data_read_finalize(chandle, name, 1311 1311 str_size(name) + 1); 1312 1312 bytes = (pos - spos) + 1; … … 1338 1338 nodep = FAT_NODE(fn); 1339 1339 1340 cap_call_handle_t c allid;1340 cap_call_handle_t chandle; 1341 1341 size_t len; 1342 if (!async_data_write_receive(&c allid, &len)) {1342 if (!async_data_write_receive(&chandle, &len)) { 1343 1343 (void) fat_node_put(fn); 1344 async_answer_0(c allid, EINVAL);1344 async_answer_0(chandle, EINVAL); 1345 1345 return EINVAL; 1346 1346 } … … 1370 1370 if (rc != EOK) { 1371 1371 (void) fat_node_put(fn); 1372 async_answer_0(c allid, rc);1372 async_answer_0(chandle, rc); 1373 1373 return rc; 1374 1374 } … … 1376 1376 if (rc != EOK) { 1377 1377 (void) fat_node_put(fn); 1378 async_answer_0(c allid, rc);1378 async_answer_0(chandle, rc); 1379 1379 return rc; 1380 1380 } 1381 (void) async_data_write_finalize(c allid,1381 (void) async_data_write_finalize(chandle, 1382 1382 b->data + pos % BPS(bs), bytes); 1383 1383 b->dirty = true; /* need to sync block */ … … 1409 1409 /* could not allocate a chain of nclsts clusters */ 1410 1410 (void) fat_node_put(fn); 1411 async_answer_0(c allid, rc);1411 async_answer_0(chandle, rc); 1412 1412 return rc; 1413 1413 } … … 1417 1417 (void) fat_free_clusters(bs, service_id, mcl); 1418 1418 (void) fat_node_put(fn); 1419 async_answer_0(c allid, rc);1419 async_answer_0(chandle, rc); 1420 1420 return rc; 1421 1421 } … … 1425 1425 (void) fat_free_clusters(bs, service_id, mcl); 1426 1426 (void) fat_node_put(fn); 1427 async_answer_0(c allid, rc);1427 async_answer_0(chandle, rc); 1428 1428 return rc; 1429 1429 } 1430 (void) async_data_write_finalize(c allid,1430 (void) async_data_write_finalize(chandle, 1431 1431 b->data + pos % BPS(bs), bytes); 1432 1432 b->dirty = true; /* need to sync block */
Note:
See TracChangeset
for help on using the changeset viewer.