Changes in uspace/srv/vfs/vfs_ipc.c [a35b458:1b20da0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ipc.c
ra35b458 r1b20da0 40 40 int newfd = IPC_GET_ARG2(*request); 41 41 bool desc = IPC_GET_ARG3(*request); 42 42 43 43 int outfd = -1; 44 44 errno_t rc = vfs_op_clone(oldfd, newfd, desc, &outfd); … … 54 54 size_t len; 55 55 errno_t rc; 56 56 57 57 /* 58 58 * Now we expect the client to send us data with the name of the file … … 65 65 return; 66 66 } 67 67 68 68 rc = vfs_op_fsprobe(fs_name, service_id, &info); 69 69 async_answer_0(rid, rc); 70 70 if (rc != EOK) 71 71 goto out; 72 72 73 73 /* Now we should get a read request */ 74 74 if (!async_data_read_receive(&callid, &len)) … … 114 114 { 115 115 int mpfd = IPC_GET_ARG1(*request); 116 116 117 117 /* 118 118 * We expect the library to do the device-name to device-handle … … 121 121 */ 122 122 service_id_t service_id = (service_id_t) IPC_GET_ARG2(*request); 123 123 124 124 unsigned int flags = (unsigned int) IPC_GET_ARG3(*request); 125 125 unsigned int instance = IPC_GET_ARG4(*request); 126 126 127 127 char *opts = NULL; 128 128 char *fs_name = NULL; 129 129 130 130 /* Now we expect to receive the mount options. */ 131 131 errno_t rc = async_data_write_accept((void **) &opts, true, 0, … … 135 135 return; 136 136 } 137 137 138 138 /* Now, we expect the client to send us data with the name of the file 139 139 * system. … … 146 146 return; 147 147 } 148 148 149 149 int outfd = 0; 150 150 rc = vfs_op_mount(mpfd, service_id, flags, instance, opts, fs_name, 151 151 &outfd); 152 152 async_answer_1(rid, rc, outfd); 153 153 154 154 free(opts); 155 155 free(fs_name); … … 190 190 char *new = NULL; 191 191 errno_t rc; 192 192 193 193 basefd = IPC_GET_ARG1(*request); 194 194 195 195 /* Retrieve the old path. */ 196 196 rc = async_data_write_accept((void **) &old, true, 0, 0, 0, NULL); 197 197 if (rc != EOK) 198 198 goto out; 199 199 200 200 /* Retrieve the new path. */ 201 201 rc = async_data_write_accept((void **) &new, true, 0, 0, 0, NULL); 202 202 if (rc != EOK) 203 203 goto out; 204 204 205 205 size_t olen; 206 206 size_t nlen; 207 207 char *oldc = canonify(old, &olen); 208 208 char *newc = canonify(new, &nlen); 209 209 210 210 if ((!oldc) || (!newc)) { 211 211 rc = EINVAL; 212 212 goto out; 213 213 } 214 214 215 215 assert(oldc[olen] == '\0'); 216 216 assert(newc[nlen] == '\0'); 217 217 218 218 rc = vfs_op_rename(basefd, oldc, newc); 219 219 … … 245 245 { 246 246 int fd = (int) IPC_GET_ARG1(*request); 247 247 248 248 errno_t rc = vfs_op_statfs(fd); 249 249 async_answer_0(rid, rc); … … 261 261 int parentfd = IPC_GET_ARG1(*request); 262 262 int expectfd = IPC_GET_ARG2(*request); 263 263 264 264 char *path; 265 265 errno_t rc = async_data_write_accept((void **) &path, true, 0, 0, 0, NULL); 266 266 if (rc == EOK) 267 267 rc = vfs_op_unlink(parentfd, expectfd, path); 268 268 269 269 async_answer_0(rid, rc); 270 270 } … … 293 293 int parentfd = IPC_GET_ARG1(*request); 294 294 int flags = IPC_GET_ARG2(*request); 295 295 296 296 int fd = 0; 297 297 char *path; … … 318 318 { 319 319 bool cont = true; 320 320 321 321 /* 322 322 * The connection was opened via the IPC_CONNECT_ME_TO call. … … 324 324 */ 325 325 async_answer_0(iid, EOK); 326 326 327 327 while (cont) { 328 328 ipc_call_t call; 329 329 ipc_callid_t callid = async_get_call(&call); 330 330 331 331 if (!IPC_GET_IMETHOD(call)) 332 332 break; 333 333 334 334 switch (IPC_GET_IMETHOD(call)) { 335 335 case VFS_IN_CLONE: … … 393 393 } 394 394 } 395 395 396 396 /* 397 397 * Open files for this client will be cleaned up when its last
Note:
See TracChangeset
for help on using the changeset viewer.