Minor update for handling TERM with serial consoles.
-Erik
This commit is contained in:
parent
42387e4964
commit
fa4718efcf
4
init.c
4
init.c
@ -314,7 +314,9 @@ static void console_init()
|
|||||||
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
|
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
|
||||||
log = NULL;
|
log = NULL;
|
||||||
secondConsole = NULL;
|
secondConsole = NULL;
|
||||||
/* Force the TERM setting to vt102 for serial console */
|
/* Force the TERM setting to vt102 for serial console --
|
||||||
|
* iff TERM is set to linux (the default) */
|
||||||
|
if (strcmp( termType, "TERM=linux" ) == 0)
|
||||||
snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
|
snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
|
||||||
message(LOG | CONSOLE,
|
message(LOG | CONSOLE,
|
||||||
"serial console detected. Disabling virtual terminals.\r\n");
|
"serial console detected. Disabling virtual terminals.\r\n");
|
||||||
|
@ -314,7 +314,9 @@ static void console_init()
|
|||||||
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
|
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
|
||||||
log = NULL;
|
log = NULL;
|
||||||
secondConsole = NULL;
|
secondConsole = NULL;
|
||||||
/* Force the TERM setting to vt102 for serial console */
|
/* Force the TERM setting to vt102 for serial console --
|
||||||
|
* iff TERM is set to linux (the default) */
|
||||||
|
if (strcmp( termType, "TERM=linux" ) == 0)
|
||||||
snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
|
snprintf(termType, sizeof(termType) - 1, "TERM=vt102");
|
||||||
message(LOG | CONSOLE,
|
message(LOG | CONSOLE,
|
||||||
"serial console detected. Disabling virtual terminals.\r\n");
|
"serial console detected. Disabling virtual terminals.\r\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user