Changes in uspace/srv/vfs/vfs_ops.c [9dc6083:feeac0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r9dc6083 rfeeac0d 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 1420 void vfs_statfs(ipc_callid_t rid, ipc_call_t *request)1421 {1422 char *path;1423 int rc = async_data_write_accept((void **) &path, true, 0, 0, 0, NULL);1424 if (rc != EOK) {1425 async_answer_0(rid, rc);1426 return;1427 }1428 1429 ipc_callid_t callid;1430 if (!async_data_read_receive(&callid, NULL)) {1431 free(path);1432 async_answer_0(callid, EINVAL);1433 async_answer_0(rid, EINVAL);1434 return;1435 }1436 1437 vfs_lookup_res_t lr;1438 fibril_rwlock_read_lock(&namespace_rwlock);1439 rc = vfs_lookup_internal(path, L_NONE, &lr, NULL);1440 free(path);1441 if (rc != EOK) {1442 fibril_rwlock_read_unlock(&namespace_rwlock);1443 async_answer_0(callid, rc);1444 async_answer_0(rid, rc);1445 return;1446 }1447 vfs_node_t *node = vfs_node_get(&lr);1448 if (!node) {1449 fibril_rwlock_read_unlock(&namespace_rwlock);1450 async_answer_0(callid, ENOMEM);1451 async_answer_0(rid, ENOMEM);1452 return;1453 }1454 1455 fibril_rwlock_read_unlock(&namespace_rwlock);1456 1457 async_exch_t *exch = vfs_exchange_grab(node->fs_handle);1458 1459 aid_t msg;1460 msg = async_send_3(exch, VFS_OUT_STATFS, node->service_id,1461 node->index, false, NULL);1462 async_forward_fast(callid, exch, 0, 0, 0, IPC_FF_ROUTE_FROM_ME);1463 1464 vfs_exchange_release(exch);1465 1466 sysarg_t rv;1467 async_wait_for(msg, &rv);1468 1469 async_answer_0(rid, rv);1470 1471 vfs_node_put(node);1472 }1473 1474 1414 /** 1475 1415 * @}
Note:
See TracChangeset
for help on using the changeset viewer.