Rev 4654 | Rev 4656 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4654 | Rev 4655 | ||
---|---|---|---|
Line 548... | Line 548... | ||
548 | /* Send arguments */ |
548 | /* Send arguments */ |
549 | rc = loader_set_args(ldr, argv); |
549 | rc = loader_set_args(ldr, argv); |
550 | if (rc != EOK) |
550 | if (rc != EOK) |
551 | goto error; |
551 | goto error; |
552 | 552 | ||
- | 553 | /* Send default files */ |
|
- | 554 | fdi_node_t *files[4]; |
|
- | 555 | fdi_node_t stdin_node; |
|
- | 556 | fdi_node_t stdout_node; |
|
- | 557 | fdi_node_t stderr_node; |
|
- | 558 | ||
- | 559 | if ((stdin != NULL) && (fnode(stdin, &stdin_node) == EOK)) |
|
- | 560 | files[0] = &stdin_node; |
|
- | 561 | else |
|
- | 562 | files[0] = NULL; |
|
- | 563 | ||
- | 564 | if ((stdout != NULL) && (fnode(stdout, &stdout_node) == EOK)) |
|
- | 565 | files[1] = &stdout_node; |
|
- | 566 | else |
|
- | 567 | files[1] = NULL; |
|
- | 568 | ||
- | 569 | if ((stderr != NULL) && (fnode(stderr, &stderr_node) == EOK)) |
|
- | 570 | files[2] = &stderr_node; |
|
- | 571 | else |
|
- | 572 | files[2] = NULL; |
|
- | 573 | ||
- | 574 | files[3] = NULL; |
|
- | 575 | ||
- | 576 | rc = loader_set_files(ldr, files); |
|
- | 577 | if (rc != EOK) |
|
- | 578 | goto error; |
|
- | 579 | ||
553 | /* Load the program. */ |
580 | /* Load the program. */ |
554 | rc = loader_load_program(ldr); |
581 | rc = loader_load_program(ldr); |
555 | if (rc != EOK) |
582 | if (rc != EOK) |
556 | goto error; |
583 | goto error; |
557 | 584 |