Rev 4344 | Rev 4347 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4344 | Rev 4345 | ||
---|---|---|---|
Line 97... | Line 97... | ||
97 | ipc_answer_0(callid, EINVAL); |
97 | ipc_answer_0(callid, EINVAL); |
98 | ipc_answer_0(rid, EINVAL); |
98 | ipc_answer_0(rid, EINVAL); |
99 | return; |
99 | return; |
100 | } |
100 | } |
101 | 101 | ||
102 | if (len > sizeof(task_id)) len = sizeof(task_id); |
102 | if (len > sizeof(task_id)) |
- | 103 | len = sizeof(task_id); |
|
103 | 104 | ||
104 | ipc_data_read_finalize(callid, &task_id, len); |
105 | ipc_data_read_finalize(callid, &task_id, len); |
105 | ipc_answer_0(rid, EOK); |
106 | ipc_answer_0(rid, EOK); |
106 | } |
107 | } |
107 | 108 | ||
Line 276... | Line 277... | ||
276 | * @param request |
277 | * @param request |
277 | * @return 0 on success, !0 on error. |
278 | * @return 0 on success, !0 on error. |
278 | */ |
279 | */ |
279 | static void loader_run(ipc_callid_t rid, ipc_call_t *request) |
280 | static void loader_run(ipc_callid_t rid, ipc_call_t *request) |
280 | { |
281 | { |
- | 282 | const char *cp; |
|
- | 283 | ||
281 | /* Set the task name. */ |
284 | /* Set the task name. */ |
- | 285 | cp = strrchr(pathname, '/'); |
|
- | 286 | cp = (cp == NULL) ? pathname : (cp + 1); |
|
282 | task_set_name(pathname); |
287 | task_set_name(cp); |
283 | 288 | ||
284 | if (is_dyn_linked == true) { |
289 | if (is_dyn_linked == true) { |
285 | /* Dynamically linked program */ |
290 | /* Dynamically linked program */ |
286 | DPRINTF("Run ELF interpreter.\n"); |
291 | DPRINTF("Run ELF interpreter.\n"); |
287 | DPRINTF("Entry point: 0x%lx\n", interp_info.entry); |
292 | DPRINTF("Entry point: 0x%lx\n", interp_info.entry); |
288 | close_console(); |
293 | close_console(); |
289 | 294 | ||
290 | ipc_answer_0(rid, EOK); |
295 | ipc_answer_0(rid, EOK); |
291 | program_run(interp_info.entry, &pcb); |
296 | program_run(interp_info.entry, &pcb); |
292 | - | ||
293 | } else { |
297 | } else { |
294 | /* Statically linked program */ |
298 | /* Statically linked program */ |
295 | close_console(); |
299 | close_console(); |
296 | ipc_answer_0(rid, EOK); |
300 | ipc_answer_0(rid, EOK); |
297 | program_run(prog_info.entry, &pcb); |
301 | program_run(prog_info.entry, &pcb); |
Line 321... | Line 325... | ||
321 | 325 | ||
322 | /* Accept the connection */ |
326 | /* Accept the connection */ |
323 | ipc_answer_0(iid, EOK); |
327 | ipc_answer_0(iid, EOK); |
324 | 328 | ||
325 | /* Ignore parameters, the connection is already open */ |
329 | /* Ignore parameters, the connection is already open */ |
- | 330 | (void) iid; |
|
326 | (void)iid; (void)icall; |
331 | (void) icall; |
327 | 332 | ||
328 | while (1) { |
333 | while (1) { |
329 | callid = async_get_call(&call); |
334 | callid = async_get_call(&call); |
330 | 335 | ||
331 | switch (IPC_GET_METHOD(call)) { |
336 | switch (IPC_GET_METHOD(call)) { |