Changes in uspace/app/bdsh/exec.c [c4a8e4a:aa8053f1] in mainline
- File:
-
- 1 edited
-
uspace/app/bdsh/exec.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/exec.c
rc4a8e4a raa8053f1 40 40 #include <str_error.h> 41 41 #include <errno.h> 42 #include <vfs/vfs.h>43 42 44 43 #include "config.h" … … 100 99 char *tmp; 101 100 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]; 104 103 FILE *files[3]; 105 104 … … 112 111 113 112 for (i = 0; i < 3 && files[i] != NULL; i++) { 114 if (f handle(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]; 116 115 } 117 116 else { 118 file_ handles_p[i] = NULL;117 file_nodes_p[i] = NULL; 119 118 } 120 119 } 121 file_ handles_p[i] = NULL;120 file_nodes_p[i] = NULL; 122 121 123 rc = task_spawnvf(&tid, tmp, (const char **) argv, file_ handles_p);122 rc = task_spawnvf(&tid, tmp, (const char **) argv, file_nodes_p); 124 123 free(tmp); 125 124 … … 134 133 printf("%s: Failed waiting for command (%s)\n", progname, 135 134 str_error(rc)); 136 return 1;137 135 } else if (texit != TASK_EXIT_NORMAL) { 138 136 printf("%s: Command failed (unexpectedly terminated)\n", progname); 139 return 1;140 137 } else if (retval != 0) { 141 138 printf("%s: Command failed (exit code %d)\n", 142 139 progname, retval); 143 return 1;144 140 } 145 141
Note:
See TracChangeset
for help on using the changeset viewer.
