Changeset dd0c8a0 in mainline for uspace/srv/vfs/vfs_ops.c
- Timestamp:
- 2013-09-29T06:56:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a9bd960d
- Parents:
- 3deb0155 (diff), 13be2583 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r3deb0155 rdd0c8a0 548 548 int found = 0; 549 549 550 list_foreach(mtab_list, cur) { 551 mtab_ent_t *mtab_ent = list_get_instance(cur, mtab_ent_t, 552 link); 553 550 list_foreach(mtab_list, link, mtab_ent_t, mtab_ent) { 554 551 if (str_cmp(mtab_ent->mp, mp) == 0) { 555 552 list_remove(&mtab_ent->link); … … 1371 1368 async_answer_1(callid, EOK, mtab_size); 1372 1369 1373 list_foreach(mtab_list, cur) { 1374 mtab_ent_t *mtab_ent = list_get_instance(cur, mtab_ent_t, 1375 link); 1376 1370 list_foreach(mtab_list, link, mtab_ent_t, mtab_ent) { 1377 1371 rc = ENOTSUP; 1378 1372 … … 1418 1412 } 1419 1413 1414 void vfs_statfs(ipc_callid_t rid, ipc_call_t *request) 1415 { 1416 char *path; 1417 int rc = async_data_write_accept((void **) &path, true, 0, 0, 0, NULL); 1418 if (rc != EOK) { 1419 async_answer_0(rid, rc); 1420 return; 1421 } 1422 1423 ipc_callid_t callid; 1424 if (!async_data_read_receive(&callid, NULL)) { 1425 free(path); 1426 async_answer_0(callid, EINVAL); 1427 async_answer_0(rid, EINVAL); 1428 return; 1429 } 1430 1431 vfs_lookup_res_t lr; 1432 fibril_rwlock_read_lock(&namespace_rwlock); 1433 rc = vfs_lookup_internal(path, L_NONE, &lr, NULL); 1434 free(path); 1435 if (rc != EOK) { 1436 fibril_rwlock_read_unlock(&namespace_rwlock); 1437 async_answer_0(callid, rc); 1438 async_answer_0(rid, rc); 1439 return; 1440 } 1441 vfs_node_t *node = vfs_node_get(&lr); 1442 if (!node) { 1443 fibril_rwlock_read_unlock(&namespace_rwlock); 1444 async_answer_0(callid, ENOMEM); 1445 async_answer_0(rid, ENOMEM); 1446 return; 1447 } 1448 1449 fibril_rwlock_read_unlock(&namespace_rwlock); 1450 1451 async_exch_t *exch = vfs_exchange_grab(node->fs_handle); 1452 1453 aid_t msg; 1454 msg = async_send_3(exch, VFS_OUT_STATFS, node->service_id, 1455 node->index, false, NULL); 1456 async_forward_fast(callid, exch, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); 1457 1458 vfs_exchange_release(exch); 1459 1460 sysarg_t rv; 1461 async_wait_for(msg, &rv); 1462 1463 async_answer_0(rid, rv); 1464 1465 vfs_node_put(node); 1466 } 1467 1420 1468 /** 1421 1469 * @}
Note:
See TracChangeset
for help on using the changeset viewer.