aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-02-21 19:25:12 +0000
committerErik Andersen <andersen@codepoet.org>2000-02-21 19:25:12 +0000
commitfa4718efcf055d8720ea99be1af237a921232f5a (patch)
tree9315aca282f73ea18da3588a7328d4233a18e8c2
parent42387e496463f6dbba168b5d36807b858f94fa96 (diff)
downloadbusybox-w32-fa4718efcf055d8720ea99be1af237a921232f5a.tar.gz
busybox-w32-fa4718efcf055d8720ea99be1af237a921232f5a.tar.bz2
busybox-w32-fa4718efcf055d8720ea99be1af237a921232f5a.zip
Minor update for handling TERM with serial consoles.
-Erik
-rw-r--r--init.c6
-rw-r--r--init/init.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/init.c b/init.c
index a3e165ecc..4a19822ae 100644
--- a/init.c
+++ b/init.c
@@ -314,8 +314,10 @@ static void console_init()
314 if (ioctl(0, TIOCGSERIAL, &sr) == 0) { 314 if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
315 log = NULL; 315 log = NULL;
316 secondConsole = NULL; 316 secondConsole = NULL;
317 /* Force the TERM setting to vt102 for serial console */ 317 /* Force the TERM setting to vt102 for serial console --
318 snprintf(termType, sizeof(termType) - 1, "TERM=vt102"); 318 * iff TERM is set to linux (the default) */
319 if (strcmp( termType, "TERM=linux" ) == 0)
320 snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
319 message(LOG | CONSOLE, 321 message(LOG | CONSOLE,
320 "serial console detected. Disabling virtual terminals.\r\n"); 322 "serial console detected. Disabling virtual terminals.\r\n");
321 } 323 }
diff --git a/init/init.c b/init/init.c
index a3e165ecc..4a19822ae 100644
--- a/init/init.c
+++ b/init/init.c
@@ -314,8 +314,10 @@ static void console_init()
314 if (ioctl(0, TIOCGSERIAL, &sr) == 0) { 314 if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
315 log = NULL; 315 log = NULL;
316 secondConsole = NULL; 316 secondConsole = NULL;
317 /* Force the TERM setting to vt102 for serial console */ 317 /* Force the TERM setting to vt102 for serial console --
318 snprintf(termType, sizeof(termType) - 1, "TERM=vt102"); 318 * iff TERM is set to linux (the default) */
319 if (strcmp( termType, "TERM=linux" ) == 0)
320 snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
319 message(LOG | CONSOLE, 321 message(LOG | CONSOLE,
320 "serial console detected. Disabling virtual terminals.\r\n"); 322 "serial console detected. Disabling virtual terminals.\r\n");
321 } 323 }