Changeset b74959bd in mainline for uspace/srv/vfs/vfs_register.c
- Timestamp:
- 2007-11-20T21:33:32Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8498915
- Parents:
- 3209923
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_register.c
r3209923 rb74959bd 156 156 * VFS info structure from the client FS. 157 157 */ 158 if (!ipc_data_receive(&callid, &call,NULL, &size)) {158 if (!ipc_data_receive(&callid, NULL, &size)) { 159 159 /* 160 160 * The client doesn't obey the same protocol as we do. 161 161 */ 162 162 dprintf("Receiving of VFS info failed.\n"); 163 ipc_answer_ fast_0(callid, EINVAL);164 ipc_answer_ fast_0(rid, EINVAL);163 ipc_answer_0(callid, EINVAL); 164 ipc_answer_0(rid, EINVAL); 165 165 return; 166 166 } … … 178 178 */ 179 179 dprintf("Received VFS info has bad size.\n"); 180 ipc_answer_ fast_0(callid, EINVAL);181 ipc_answer_ fast_0(rid, EINVAL);180 ipc_answer_0(callid, EINVAL); 181 ipc_answer_0(rid, EINVAL); 182 182 return; 183 183 } … … 190 190 if (!fs_info) { 191 191 dprintf("Could not allocate memory for FS info.\n"); 192 ipc_answer_ fast_0(callid, ENOMEM);193 ipc_answer_ fast_0(rid, ENOMEM);192 ipc_answer_0(callid, ENOMEM); 193 ipc_answer_0(rid, ENOMEM); 194 194 return; 195 195 } 196 196 link_initialize(&fs_info->fs_link); 197 197 198 rc = ipc_data_deliver(callid, & call, &fs_info->vfs_info, size);198 rc = ipc_data_deliver(callid, &fs_info->vfs_info, size); 199 199 if (rc != EOK) { 200 200 dprintf("Failed to deliver the VFS info into our AS, rc=%d.\n", 201 201 rc); 202 202 free(fs_info); 203 ipc_answer_ fast_0(callid, rc);204 ipc_answer_ fast_0(rid, rc);203 ipc_answer_0(callid, rc); 204 ipc_answer_0(rid, rc); 205 205 return; 206 206 } … … 210 210 if (!vfs_info_sane(&fs_info->vfs_info)) { 211 211 free(fs_info); 212 ipc_answer_ fast_0(callid, EINVAL);213 ipc_answer_ fast_0(rid, EINVAL);212 ipc_answer_0(callid, EINVAL); 213 ipc_answer_0(rid, EINVAL); 214 214 return; 215 215 } … … 227 227 futex_up(&fs_head_futex); 228 228 free(fs_info); 229 ipc_answer_ fast_0(callid, EEXISTS);230 ipc_answer_ fast_0(rid, EEXISTS);229 ipc_answer_0(callid, EEXISTS); 230 ipc_answer_0(rid, EEXISTS); 231 231 return; 232 232 } … … 249 249 futex_up(&fs_head_futex); 250 250 free(fs_info); 251 ipc_answer_ fast_0(callid, EINVAL);252 ipc_answer_ fast_0(rid, EINVAL);251 ipc_answer_0(callid, EINVAL); 252 ipc_answer_0(rid, EINVAL); 253 253 return; 254 254 } 255 255 fs_info->phone = IPC_GET_ARG3(call); 256 ipc_answer_ fast_0(callid, EOK);256 ipc_answer_0(callid, EOK); 257 257 258 258 dprintf("Callback connection to FS created.\n"); … … 268 268 ipc_hangup(fs_info->phone); 269 269 free(fs_info); 270 ipc_answer_ fast_0(callid, EINVAL);271 ipc_answer_ fast_0(rid, EINVAL);270 ipc_answer_0(callid, EINVAL); 271 ipc_answer_0(rid, EINVAL); 272 272 return; 273 273 } … … 283 283 ipc_hangup(fs_info->phone); 284 284 free(fs_info); 285 ipc_answer_ fast_0(callid, EINVAL);286 ipc_answer_ fast_0(rid, EINVAL);285 ipc_answer_0(callid, EINVAL); 286 ipc_answer_0(rid, EINVAL); 287 287 return; 288 288 } … … 291 291 * Commit to read-only sharing the PLB with the client. 292 292 */ 293 ipc_answer_ fast(callid, EOK, (ipcarg_t) plb,293 ipc_answer_2(callid, EOK, (ipcarg_t) plb, 294 294 (ipcarg_t) (AS_AREA_READ | AS_AREA_CACHEABLE)); 295 295 … … 302 302 */ 303 303 fs_info->fs_handle = (int) atomic_postinc(&fs_handle_next); 304 ipc_answer_ fast_1(rid, EOK, (ipcarg_t) fs_info->fs_handle);304 ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle); 305 305 306 306 futex_up(&fs_head_futex);
Note:
See TracChangeset
for help on using the changeset viewer.