Subversion Repositories HelenOS

Rev

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

Rev 3042 Rev 3424
Line 435... Line 435...
435
{
435
{
436
    call_t call;
436
    call_t call;
437
    phone_t *phone;
437
    phone_t *phone;
438
    int res;
438
    int res;
439
    int rc;
439
    int rc;
440
 
440
   
441
    GET_CHECK_PHONE(phone, phoneid, return ENOENT);
441
    GET_CHECK_PHONE(phone, phoneid, return ENOENT);
442
 
442
 
443
    ipc_call_static_init(&call);
443
    ipc_call_static_init(&call);
444
    IPC_SET_METHOD(call.data, method);
444
    IPC_SET_METHOD(call.data, method);
445
    IPC_SET_ARG1(call.data, arg1);
445
    IPC_SET_ARG1(call.data, arg1);
Line 635... Line 635...
635
 
635
 
636
    GET_CHECK_PHONE(phone, phoneid, {
636
    GET_CHECK_PHONE(phone, phoneid, {
637
        IPC_SET_RETVAL(call->data, EFORWARD);
637
        IPC_SET_RETVAL(call->data, EFORWARD);
638
        ipc_answer(&TASK->answerbox, call);
638
        ipc_answer(&TASK->answerbox, call);
639
        return ENOENT;
639
        return ENOENT;
640
    });    
640
    });
641
 
641
 
642
    if (!method_is_forwardable(IPC_GET_METHOD(call->data))) {
642
    if (!method_is_forwardable(IPC_GET_METHOD(call->data))) {
643
        IPC_SET_RETVAL(call->data, EFORWARD);
643
        IPC_SET_RETVAL(call->data, EFORWARD);
644
        ipc_answer(&TASK->answerbox, call);
644
        ipc_answer(&TASK->answerbox, call);
645
        return EPERM;
645
        return EPERM;
Line 873... Line 873...
873
    ipc_irq_unregister(&TASK->answerbox, inr, devno);
873
    ipc_irq_unregister(&TASK->answerbox, inr, devno);
874
 
874
 
875
    return 0;
875
    return 0;
876
}
876
}
877
 
877
 
878
#include <console/klog.h>
878
#include <console/console.h>
879
 
879
 
880
/**
880
/**
881
 * Syscall connect to a task by id.
881
 * Syscall connect to a task by id.
882
 *
882
 *
883
 * @return      Phone id on success, or negative error code.
883
 * @return      Phone id on success, or negative error code.
Line 889... Line 889...
889
   
889
   
890
    rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
890
    rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
891
    if (rc != 0)
891
    if (rc != 0)
892
        return (unative_t) rc;
892
        return (unative_t) rc;
893
 
893
 
894
    klog_printf("sys_ipc_connect_kbox(%lld, %d)", taskid_arg.value);
894
    printf("sys_ipc_connect_kbox(%lld, %d)\n", taskid_arg.value);
895
 
895
 
896
    return ipc_connect_kbox(taskid_arg.value);
896
    return ipc_connect_kbox(taskid_arg.value);
897
}
897
}
898
 
898
 
899
/** @}
899
/** @}