forked from pool/util-linux
Marcus Meissner
d4b4a095b8
util-linux 2.24.1 OBS-URL: https://build.opensuse.org/request/show/221543 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=223
35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
Support the special terminal on first serial line on a S/390(x) which
|
|
is due legacy reasons a block terminal of type 3270 or higher. Whereas
|
|
the second serial line on a S/390(x) is a real character terminal which
|
|
is compatible with VT220.
|
|
|
|
---
|
|
term-utils/agetty.c | 14 ++++++++++++++
|
|
1 file changed, 14 insertions(+)
|
|
|
|
Index: util-linux-2.24.1/term-utils/agetty.c
|
|
===================================================================
|
|
--- util-linux-2.24.1.orig/term-utils/agetty.c 2014-02-09 21:19:01.000000000 +0000
|
|
+++ util-linux-2.24.1/term-utils/agetty.c 2014-02-09 21:19:27.000000000 +0000
|
|
@@ -1042,6 +1042,20 @@ static void open_tty(char *tty, struct t
|
|
/* make stdio unbuffered for slow modem lines */
|
|
setvbuf(stdout, NULL, _IONBF, 0);
|
|
|
|
+#if defined (__s390__) || defined (__s390x__)
|
|
+ if (!op->term) {
|
|
+ /*
|
|
+ * Special terminal on first serial line on a S/390(x) which
|
|
+ * is due legacy reasons a block terminal of type 3270 or
|
|
+ * higher. Whereas the second serial line on a S/390(x) is
|
|
+ * a real character terminal which is compatible with VT220.
|
|
+ */
|
|
+ if (strcmp(op->tty, "ttyS0") == 0 || strncmp(op->tty, "3270/tty", 8) == 0)
|
|
+ op->term = DEFAULT_TTYS0;
|
|
+ else if (strcmp(op->tty, "ttyS1") == 0)
|
|
+ op->term = DEFAULT_TTYS1;
|
|
+ }
|
|
+#endif
|
|
/*
|
|
* The following ioctl will fail if stdin is not a tty, but also when
|
|
* there is noise on the modem control lines. In the latter case, the
|