forked from pool/util-linux
1383751f43
- Modify patch agetty-on-s390-on-dev--3270-tty1-line.patch and patch tty3270-on-serial-line-of-s390.patch to handle 3270 terminals - Really do not verify /usr/bin/eject - Add patch agetty-on-s390-on-dev--3270-tty1-line.patch to let agetty detect /dev/3270/tty1 as device not as baud rate OBS-URL: https://build.opensuse.org/request/show/220785 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=178
44 lines
1.5 KiB
Diff
44 lines
1.5 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.
|
|
|
|
---
|
|
agetty.c | 18 ++++++++++++++++++
|
|
1 file changed, 18 insertions(+)
|
|
|
|
--- term-utils/agetty.c
|
|
+++ term-utils/agetty.c 2013-11-29 11:57:11.000000000 +0000
|
|
@@ -49,6 +49,10 @@
|
|
# ifndef DEFAULT_VCTERM
|
|
# define DEFAULT_VCTERM "linux"
|
|
# endif
|
|
+# if defined (__s390__) || defined (__s390x__)
|
|
+# define DEFAULT_TTYS0 "ibm327x"
|
|
+# define DEFAULT_TTYS1 "vt220"
|
|
+# endif
|
|
# ifndef DEFAULT_STERM
|
|
# define DEFAULT_STERM "vt102"
|
|
# endif
|
|
@@ -983,6 +987,20 @@ static void open_tty(char *tty, struct t
|
|
if (tcgetattr(STDIN_FILENO, tp) < 0)
|
|
log_err(_("%s: failed to get terminal attributes: %m"), tty);
|
|
|
|
+#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
|
|
/*
|
|
* Detect if this is a virtual console or serial/modem line.
|
|
* In case of a virtual console the ioctl TIOCMGET fails and
|