diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-14 19:46:56 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-14 19:46:56 +0200 |
| commit | 0485b677d2ccd8cd60579446cd1addcb4f322db3 (patch) | |
| tree | 809370aada4b1755851270a082be111794909870 /shell | |
| parent | c2aea025bba33323b7a35dd33428277f21121251 (diff) | |
| download | busybox-w32-0485b677d2ccd8cd60579446cd1addcb4f322db3.tar.gz busybox-w32-0485b677d2ccd8cd60579446cd1addcb4f322db3.tar.bz2 busybox-w32-0485b677d2ccd8cd60579446cd1addcb4f322db3.zip | |
ash: one "current line = 1" might be missing, fix that
I'm not sure this is necessary, but dash has this init here.
Just in case, do it too.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index 1917b552c..224d77633 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -1229,6 +1229,10 @@ struct strpush { | |||
| 1229 | int unget; | 1229 | int unget; |
| 1230 | }; | 1230 | }; |
| 1231 | 1231 | ||
| 1232 | /* | ||
| 1233 | * The parsefile structure pointed to by the global variable parsefile | ||
| 1234 | * contains information about the current file being read. | ||
| 1235 | */ | ||
| 1232 | struct parsefile { | 1236 | struct parsefile { |
| 1233 | struct parsefile *prev; /* preceding file on stack */ | 1237 | struct parsefile *prev; /* preceding file on stack */ |
| 1234 | int linno; /* current line */ | 1238 | int linno; /* current line */ |
| @@ -1902,10 +1906,6 @@ nextopt(const char *optstring) | |||
| 1902 | 1906 | ||
| 1903 | /* ============ Shell variables */ | 1907 | /* ============ Shell variables */ |
| 1904 | 1908 | ||
| 1905 | /* | ||
| 1906 | * The parsefile structure pointed to by the global variable parsefile | ||
| 1907 | * contains information about the current file being read. | ||
| 1908 | */ | ||
| 1909 | struct shparam { | 1909 | struct shparam { |
| 1910 | int nparam; /* # of positional parameters (without $0) */ | 1910 | int nparam; /* # of positional parameters (without $0) */ |
| 1911 | #if ENABLE_ASH_GETOPTS | 1911 | #if ENABLE_ASH_GETOPTS |
| @@ -13603,6 +13603,7 @@ init(void) | |||
| 13603 | { | 13603 | { |
| 13604 | /* we will never free this */ | 13604 | /* we will never free this */ |
| 13605 | basepf.next_to_pgetc = basepf.buf = ckmalloc(IBUFSIZ); | 13605 | basepf.next_to_pgetc = basepf.buf = ckmalloc(IBUFSIZ); |
| 13606 | basepf.linno = 1; | ||
| 13606 | 13607 | ||
| 13607 | sigmode[SIGCHLD - 1] = S_DFL; /* ensure we install handler even if it is SIG_IGNed */ | 13608 | sigmode[SIGCHLD - 1] = S_DFL; /* ensure we install handler even if it is SIG_IGNed */ |
| 13608 | setsignal(SIGCHLD); | 13609 | setsignal(SIGCHLD); |
