Subversion Repositories HelenOS

Rev

Rev 3424 | Rev 3431 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3424 Rev 3425
Line 269... Line 269...
269
        ASSERT(answer->buffer);
269
        ASSERT(answer->buffer);
270
        if (!IPC_GET_RETVAL(answer->data)) {
270
        if (!IPC_GET_RETVAL(answer->data)) {
271
            /* The recipient agreed to receive data. */
271
            /* The recipient agreed to receive data. */
272
            int rc;
272
            int rc;
273
            uintptr_t dst;
273
            uintptr_t dst;
274
            uintptr_t size;
274
            size_t size;
275
            uintptr_t max_size;
275
            size_t max_size;
276
 
276
 
277
            dst = IPC_GET_ARG1(answer->data);
277
            dst = (uintptr_t)IPC_GET_ARG1(answer->data);
278
            size = IPC_GET_ARG2(answer->data);
278
            size = (size_t)IPC_GET_ARG2(answer->data);
279
            max_size = IPC_GET_ARG2(*olddata);
279
            max_size = (size_t)IPC_GET_ARG2(*olddata);
280
 
280
 
281
            if (size <= max_size) {
281
            if (size <= max_size) {
282
                rc = copy_to_uspace((void *) dst,
282
                rc = copy_to_uspace((void *) dst,
283
                    answer->buffer, size);
283
                    answer->buffer, size);
284
                if (rc)
284
                if (rc)
Line 451... Line 451...
451
     */
451
     */
452
    IPC_SET_ARG4(call.data, 0);
452
    IPC_SET_ARG4(call.data, 0);
453
    IPC_SET_ARG5(call.data, 0);
453
    IPC_SET_ARG5(call.data, 0);
454
 
454
 
455
    if (!(res = request_preprocess(&call, phone))) {
455
    if (!(res = request_preprocess(&call, phone))) {
456
        ipc_call_sync(phone, &call);
456
        rc = ipc_call_sync(phone, &call);
-
 
457
        if (rc != EOK)
-
 
458
            return rc;
457
        process_answer(&call);
459
        process_answer(&call);
458
    } else {
460
    } else {
459
        IPC_SET_RETVAL(call.data, res);
461
        IPC_SET_RETVAL(call.data, res);
460
    }
462
    }
461
    rc = STRUCT_TO_USPACE(&data->args, &call.data.args);
463
    rc = STRUCT_TO_USPACE(&data->args, &call.data.args);
Line 489... Line 491...
489
        return (unative_t) rc;
491
        return (unative_t) rc;
490
 
492
 
491
    GET_CHECK_PHONE(phone, phoneid, return ENOENT);
493
    GET_CHECK_PHONE(phone, phoneid, return ENOENT);
492
 
494
 
493
    if (!(res = request_preprocess(&call, phone))) {
495
    if (!(res = request_preprocess(&call, phone))) {
494
        ipc_call_sync(phone, &call);
496
        rc = ipc_call_sync(phone, &call);
-
 
497
        if (rc != EOK)
-
 
498
            return rc;
495
        process_answer(&call);
499
        process_answer(&call);
496
    } else
500
    } else
497
        IPC_SET_RETVAL(call.data, res);
501
        IPC_SET_RETVAL(call.data, res);
498
 
502
 
499
    rc = STRUCT_TO_USPACE(&reply->args, &call.data.args);
503
    rc = STRUCT_TO_USPACE(&reply->args, &call.data.args);