Changeset b1cdc44a in mainline for uspace/srv/vfs/vfs_ops.c
- Timestamp:
- 2013-07-25T11:29:28Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b1b1891
- Parents:
- 0ed9cb6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r0ed9cb6 rb1cdc44a 1063 1063 } 1064 1064 1065 void vfs_stat(ipc_callid_t rid, ipc_call_t *request)1066 {1067 char *path;1068 int rc = async_data_write_accept((void **) &path, true, 0, 0, 0, NULL);1069 if (rc != EOK) {1070 async_answer_0(rid, rc);1071 return;1072 }1073 1074 ipc_callid_t callid;1075 if (!async_data_read_receive(&callid, NULL)) {1076 free(path);1077 async_answer_0(callid, EINVAL);1078 async_answer_0(rid, EINVAL);1079 return;1080 }1081 1082 vfs_lookup_res_t lr;1083 fibril_rwlock_read_lock(&namespace_rwlock);1084 rc = vfs_lookup_internal(path, L_NONE, &lr, NULL);1085 free(path);1086 if (rc != EOK) {1087 fibril_rwlock_read_unlock(&namespace_rwlock);1088 async_answer_0(callid, rc);1089 async_answer_0(rid, rc);1090 return;1091 }1092 vfs_node_t *node = vfs_node_get(&lr);1093 if (!node) {1094 fibril_rwlock_read_unlock(&namespace_rwlock);1095 async_answer_0(callid, ENOMEM);1096 async_answer_0(rid, ENOMEM);1097 return;1098 }1099 1100 fibril_rwlock_read_unlock(&namespace_rwlock);1101 1102 async_exch_t *exch = vfs_exchange_grab(node->fs_handle);1103 1104 aid_t msg;1105 msg = async_send_3(exch, VFS_OUT_STAT, node->service_id,1106 node->index, false, NULL);1107 async_forward_fast(callid, exch, 0, 0, 0, IPC_FF_ROUTE_FROM_ME);1108 1109 vfs_exchange_release(exch);1110 1111 sysarg_t rv;1112 async_wait_for(msg, &rv);1113 1114 async_answer_0(rid, rv);1115 1116 vfs_node_put(node);1117 }1118 1119 1065 void vfs_mkdir(ipc_callid_t rid, ipc_call_t *request) 1120 1066 {
Note:
See TracChangeset
for help on using the changeset viewer.