Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/exec.c

    rc4a8e4a raa8053f1  
    4040#include <str_error.h>
    4141#include <errno.h>
    42 #include <vfs/vfs.h>
    4342
    4443#include "config.h"
     
    10099        char *tmp;
    101100        int rc, retval, i;
    102         int file_handles[3];
    103         int *file_handles_p[4];
     101        fdi_node_t file_nodes[3];
     102        fdi_node_t *file_nodes_p[4];
    104103        FILE *files[3];
    105104
     
    112111       
    113112        for (i = 0; i < 3 && files[i] != NULL; i++) {
    114                 if (fhandle(files[i], &file_handles[i]) == EOK) {
    115                         file_handles_p[i] = &file_handles[i];
     113                if (fnode(files[i], &file_nodes[i]) == EOK) {
     114                        file_nodes_p[i] = &file_nodes[i];
    116115                }
    117116                else {
    118                         file_handles_p[i] = NULL;
     117                        file_nodes_p[i] = NULL;
    119118                }
    120119        }
    121         file_handles_p[i] = NULL;
     120        file_nodes_p[i] = NULL;
    122121
    123         rc = task_spawnvf(&tid, tmp, (const char **) argv, file_handles_p);
     122        rc = task_spawnvf(&tid, tmp, (const char **) argv, file_nodes_p);
    124123        free(tmp);
    125124
     
    134133                printf("%s: Failed waiting for command (%s)\n", progname,
    135134                    str_error(rc));
    136                 return 1;
    137135        } else if (texit != TASK_EXIT_NORMAL) {
    138136                printf("%s: Command failed (unexpectedly terminated)\n", progname);
    139                 return 1;
    140137        } else if (retval != 0) {
    141138                printf("%s: Command failed (exit code %d)\n",
    142139                    progname, retval);
    143                 return 1;
    144140        }
    145141
Note: See TracChangeset for help on using the changeset viewer.