diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-08-28 13:00:29 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-08-28 13:00:29 +0200 |
| commit | cc272b06eefb87030bb85b686abdbc22b5ed1c34 (patch) | |
| tree | 06024199184cfab43807a1fdcc2a240b9cf5ac99 /shell | |
| parent | d84b175cb6948eb17f847313bf912174e2f934e1 (diff) | |
| download | busybox-w32-1_19_1.tar.gz busybox-w32-1_19_1.tar.bz2 busybox-w32-1_19_1.zip | |
Apply post-1.19.0 patches, bump version to 1.19.11_19_1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/cttyhack.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/cttyhack.c b/shell/cttyhack.c index 4261289b4..37ea13723 100644 --- a/shell/cttyhack.c +++ b/shell/cttyhack.c | |||
| @@ -122,10 +122,12 @@ int cttyhack_main(int argc UNUSED_PARAM, char **argv) | |||
| 122 | do { | 122 | do { |
| 123 | #ifdef __linux__ | 123 | #ifdef __linux__ |
| 124 | int s = open_read_close("/sys/class/tty/console/active", | 124 | int s = open_read_close("/sys/class/tty/console/active", |
| 125 | console + 5, sizeof(console) - 5 - 1); | 125 | console + 5, sizeof(console) - 5); |
| 126 | if (s > 0) { | 126 | if (s > 0) { |
| 127 | /* found active console via sysfs (Linux 2.6.38+) */ | 127 | /* found active console via sysfs (Linux 2.6.38+) |
| 128 | console[5 + s] = '\0'; | 128 | * sysfs string looks like "ttyS0\n" so zap the newline: |
| 129 | */ | ||
| 130 | console[4 + s] = '\0'; | ||
| 129 | break; | 131 | break; |
| 130 | } | 132 | } |
| 131 | 133 | ||
