Subversion Repositories HelenOS

Rev

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

Rev 3222 Rev 3447
Line 75... Line 75...
75
/** Argument vector */
75
/** Argument vector */
76
static char **argv = NULL;
76
static char **argv = NULL;
77
/** Buffer holding all arguments */
77
/** Buffer holding all arguments */
78
static char *arg_buf = NULL;
78
static char *arg_buf = NULL;
79
 
79
 
-
 
80
static int loader_get_taskid(ipc_callid_t rid, ipc_call_t *request)
-
 
81
{
-
 
82
    ipc_callid_t callid;
-
 
83
    task_id_t task_id;
-
 
84
    size_t len;
-
 
85
 
-
 
86
    task_id = task_get_id();
-
 
87
 
-
 
88
    if (!ipc_data_read_receive(&callid, &len)) {
-
 
89
        ipc_answer_0(callid, EINVAL);
-
 
90
        ipc_answer_0(rid, EINVAL);
-
 
91
        return;
-
 
92
    }
-
 
93
 
-
 
94
    if (len > sizeof(task_id)) len = sizeof(task_id);
-
 
95
 
-
 
96
    ipc_data_write_finalize(callid, &task_id, len);
-
 
97
    ipc_answer_0(rid, EOK);
-
 
98
}
-
 
99
 
-
 
100
 
80
/** Receive a call setting pathname of the program to execute.
101
/** Receive a call setting pathname of the program to execute.
81
 *
102
 *
82
 * @param rid
103
 * @param rid
83
 * @param request
104
 * @param request
84
 */
105
 */
Line 272... Line 293...
272
    while (1) {
293
    while (1) {
273
        callid = async_get_call(&call);
294
        callid = async_get_call(&call);
274
//      printf("received call from phone %d, method=%d\n",
295
//      printf("received call from phone %d, method=%d\n",
275
//          call.in_phone_hash, IPC_GET_METHOD(call));
296
//          call.in_phone_hash, IPC_GET_METHOD(call));
276
        switch (IPC_GET_METHOD(call)) {
297
        switch (IPC_GET_METHOD(call)) {
-
 
298
        case LOADER_GET_TASKID:
-
 
299
            loader_get_taskid(callid, &call);
-
 
300
            continue;
277
        case LOADER_SET_PATHNAME:
301
        case LOADER_SET_PATHNAME:
278
            loader_set_pathname(callid, &call);
302
            loader_set_pathname(callid, &call);
279
            continue;
303
            continue;
280
        case LOADER_SET_ARGS:
304
        case LOADER_SET_ARGS:
281
            loader_set_args(callid, &call);
305
            loader_set_args(callid, &call);