From 23975498deb71e95771da6a80550d83926e0148f07b3947faf5312416617d4b3 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 7 May 2014 13:37:00 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=235 --- tty3270-on-serial-line-of-s390.patch | 34 ++++++++++++++++++++++++++++ util-linux.changes | 7 ++++++ util-linux.spec | 4 ++++ 3 files changed, 45 insertions(+) create mode 100644 tty3270-on-serial-line-of-s390.patch diff --git a/tty3270-on-serial-line-of-s390.patch b/tty3270-on-serial-line-of-s390.patch new file mode 100644 index 0000000..891682a --- /dev/null +++ b/tty3270-on-serial-line-of-s390.patch @@ -0,0 +1,34 @@ +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 diff --git a/util-linux.changes b/util-linux.changes index ba298b6..3ff6e2f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 7 13:34:19 UTC 2014 - werner@suse.de + +- Readd patch tty3270-on-serial-line-of-s390.patch + as it includes a required part for s390 which has *not* + added upstream. + ------------------------------------------------------------------- Thu Apr 24 11:33:36 UTC 2014 - sweet_f_a@gmx.de diff --git a/util-linux.spec b/util-linux.spec index 1df7767..a416845 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -104,6 +104,9 @@ Patch2: util-linux-2.23.1-eject-fpie.patch Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff # disable encryption Patch12: util-linux-2.23.1-noenc-suse.diff +# PATCH-FIX-SUSE -- better support of S390 in agetty +# Do not drop this patch as it includes changes which are NOT upstream yet +Patch14: tty3270-on-serial-line-of-s390.patch # PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture Patch15: agetty-fooled-on-serial-line-due-plymouth.patch # PATCH-FIX-SUSE -- Let agetty detect /dev/3270/tty1 as device not as baud rate @@ -247,6 +250,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch2 -p1 %patch4 -p1 %patch12 -p1 +%patch14 -p1 %patch15 -p0 %patch16 -p0 %patch17 -p0