Changeset b1cdc44a in mainline
- Timestamp:
- 2013-07-25T11:29:28Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b1b1891
- Parents:
- 0ed9cb6
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r0ed9cb6 rb1cdc44a 720 720 o = oper_new("rename", 0, arg_def, V_ERRNO, 0, resp_def); 721 721 proto_add_oper(p, VFS_IN_RENAME, o); 722 o = oper_new("stat", 0, arg_def, V_ERRNO, 0, resp_def);723 proto_add_oper(p, VFS_IN_STAT, o);724 722 o = oper_new("walk", 3, arg_def, V_INT_ERRNO, 0, resp_def); 725 723 proto_add_oper(p, VFS_IN_WALK, o); -
uspace/lib/c/include/ipc/vfs.h
r0ed9cb6 rb1cdc44a 77 77 VFS_IN_UNLINK, 78 78 VFS_IN_RENAME, 79 VFS_IN_STAT,80 79 VFS_IN_DUP, 81 80 VFS_IN_WAIT_HANDLE, -
uspace/srv/vfs/vfs.c
r0ed9cb6 rb1cdc44a 109 109 vfs_fstat(callid, &call); 110 110 break; 111 case VFS_IN_STAT:112 vfs_stat(callid, &call);113 break;114 111 case VFS_IN_MKDIR: 115 112 vfs_mkdir(callid, &call); -
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.