diff options
| author | Ron Yorston <rmy@pobox.com> | 2018-12-03 13:33:04 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2018-12-03 13:33:04 +0000 |
| commit | 3d94569bbeed8f90ec36cea7d7f3f8f9077b1657 (patch) | |
| tree | cd3981067f271c958ac988d10501109224a06c2e /shell | |
| parent | a8ed2141f19469fef2085f1eaa6ae8286f84f67c (diff) | |
| download | busybox-w32-3d94569bbeed8f90ec36cea7d7f3f8f9077b1657.tar.gz busybox-w32-3d94569bbeed8f90ec36cea7d7f3f8f9077b1657.tar.bz2 busybox-w32-3d94569bbeed8f90ec36cea7d7f3f8f9077b1657.zip | |
ash: more clean up
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c index 638f912c0..bf197cd70 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -357,7 +357,7 @@ struct forkshell { | |||
| 357 | 357 | ||
| 358 | /* optional data, used by forkshell_child */ | 358 | /* optional data, used by forkshell_child */ |
| 359 | int flags; | 359 | int flags; |
| 360 | int fd[10]; | 360 | int fd[3]; |
| 361 | union node *n; | 361 | union node *n; |
| 362 | char **argv; | 362 | char **argv; |
| 363 | char *path; | 363 | char *path; |
| @@ -10750,7 +10750,7 @@ evalcommand(union node *cmd, int flags) | |||
| 10750 | spawn_forkshell(jp, &fs, FORK_FG); | 10750 | spawn_forkshell(jp, &fs, FORK_FG); |
| 10751 | status = waitforjob(jp); | 10751 | status = waitforjob(jp); |
| 10752 | INT_ON; | 10752 | INT_ON; |
| 10753 | TRACE(("forked child exited with %d\n", exitstatus)); | 10753 | TRACE(("forked child exited with %d\n", status)); |
| 10754 | break; | 10754 | break; |
| 10755 | } | 10755 | } |
| 10756 | /* goes through to shellexec() */ | 10756 | /* goes through to shellexec() */ |
| @@ -15285,8 +15285,8 @@ tblentry_copy(struct tblentry *tep) | |||
| 15285 | memcpy(*newp, tep, size); | 15285 | memcpy(*newp, tep, size); |
| 15286 | switch (tep->cmdtype) { | 15286 | switch (tep->cmdtype) { |
| 15287 | case CMDBUILTIN: | 15287 | case CMDBUILTIN: |
| 15288 | /* No pointer saving, this field must be fixed by forkshell_init() */ | 15288 | /* Save index of builtin, not pointer; fixed by forkshell_init() */ |
| 15289 | (*newp)->param.cmd = (const struct builtincmd *)(tep->param.cmd - builtintab); | 15289 | (*newp)->param.index = tep->param.cmd - builtintab; |
| 15290 | break; | 15290 | break; |
| 15291 | case CMDFUNCTION: | 15291 | case CMDFUNCTION: |
| 15292 | (*newp)->param.func = funcblock; | 15292 | (*newp)->param.func = funcblock; |
| @@ -15746,7 +15746,7 @@ forkshell_init(const char *idstr) | |||
| 15746 | struct tblentry *e = fs->cmdtable[i]; | 15746 | struct tblentry *e = fs->cmdtable[i]; |
| 15747 | while (e) { | 15747 | while (e) { |
| 15748 | if (e->cmdtype == CMDBUILTIN) | 15748 | if (e->cmdtype == CMDBUILTIN) |
| 15749 | e->param.cmd = builtintab + (int)(intptr_t)e->param.cmd; | 15749 | e->param.cmd = builtintab + e->param.index; |
| 15750 | e = e->next; | 15750 | e = e->next; |
| 15751 | } | 15751 | } |
| 15752 | } | 15752 | } |
