Rev 3149 | Rev 3448 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3149 | Rev 3403 | ||
---|---|---|---|
Line 268... | Line 268... | ||
268 | ASSERT(answer->buffer); |
268 | ASSERT(answer->buffer); |
269 | if (!IPC_GET_RETVAL(answer->data)) { |
269 | if (!IPC_GET_RETVAL(answer->data)) { |
270 | /* The recipient agreed to receive data. */ |
270 | /* The recipient agreed to receive data. */ |
271 | int rc; |
271 | int rc; |
272 | uintptr_t dst; |
272 | uintptr_t dst; |
273 | uintptr_t size; |
273 | size_t size; |
274 | uintptr_t max_size; |
274 | size_t max_size; |
275 | 275 | ||
276 | dst = IPC_GET_ARG1(answer->data); |
276 | dst = (uintptr_t)IPC_GET_ARG1(answer->data); |
277 | size = IPC_GET_ARG2(answer->data); |
277 | size = (size_t)IPC_GET_ARG2(answer->data); |
278 | max_size = IPC_GET_ARG2(*olddata); |
278 | max_size = (size_t)IPC_GET_ARG2(*olddata); |
279 | 279 | ||
280 | if (size <= max_size) { |
280 | if (size <= max_size) { |
281 | rc = copy_to_uspace((void *) dst, |
281 | rc = copy_to_uspace((void *) dst, |
282 | answer->buffer, size); |
282 | answer->buffer, size); |
283 | if (rc) |
283 | if (rc) |
Line 440... | Line 440... | ||
440 | */ |
440 | */ |
441 | IPC_SET_ARG4(call.data, 0); |
441 | IPC_SET_ARG4(call.data, 0); |
442 | IPC_SET_ARG5(call.data, 0); |
442 | IPC_SET_ARG5(call.data, 0); |
443 | 443 | ||
444 | if (!(res = request_preprocess(&call))) { |
444 | if (!(res = request_preprocess(&call))) { |
445 | ipc_call_sync(phone, &call); |
445 | rc = ipc_call_sync(phone, &call); |
- | 446 | if (rc != EOK) |
|
- | 447 | return rc; |
|
446 | process_answer(&call); |
448 | process_answer(&call); |
447 | } else { |
449 | } else { |
448 | IPC_SET_RETVAL(call.data, res); |
450 | IPC_SET_RETVAL(call.data, res); |
449 | } |
451 | } |
450 | rc = STRUCT_TO_USPACE(&data->args, &call.data.args); |
452 | rc = STRUCT_TO_USPACE(&data->args, &call.data.args); |
Line 478... | Line 480... | ||
478 | return (unative_t) rc; |
480 | return (unative_t) rc; |
479 | 481 | ||
480 | GET_CHECK_PHONE(phone, phoneid, return ENOENT); |
482 | GET_CHECK_PHONE(phone, phoneid, return ENOENT); |
481 | 483 | ||
482 | if (!(res = request_preprocess(&call))) { |
484 | if (!(res = request_preprocess(&call))) { |
483 | ipc_call_sync(phone, &call); |
485 | rc = ipc_call_sync(phone, &call); |
- | 486 | if (rc != EOK) |
|
- | 487 | return rc; |
|
484 | process_answer(&call); |
488 | process_answer(&call); |
485 | } else |
489 | } else |
486 | IPC_SET_RETVAL(call.data, res); |
490 | IPC_SET_RETVAL(call.data, res); |
487 | 491 | ||
488 | rc = STRUCT_TO_USPACE(&reply->args, &call.data.args); |
492 | rc = STRUCT_TO_USPACE(&reply->args, &call.data.args); |