forked from pool/util-linux
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=239
This commit is contained in:
parent
9b7feaf946
commit
32c852e202
@ -1,14 +1,21 @@
|
|||||||
Be aware that on s390 the 3270 terminal line is found at
|
|
||||||
/dev/3270/tty<X>. That is that the baud speed rate numbers
|
|
||||||
have to be identified in a unique way.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
agetty.c | 6 ++++--
|
login-utils/sulogin.c | 8 +++++++-
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
term-utils/agetty.c | 15 ++++++++++-----
|
||||||
|
2 files changed, 17 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
--- term-utils/agetty.c
|
--- term-utils/agetty.c
|
||||||
+++ term-utils/agetty.c 2014-02-04 09:33:13.162735763 +0000
|
+++ term-utils/agetty.c 2014-05-08 08:08:26.384484940 +0000
|
||||||
@@ -568,6 +568,8 @@ static void login_options_to_argv(char *
|
@@ -51,7 +51,8 @@
|
||||||
|
# define DEFAULT_VCTERM "linux"
|
||||||
|
# endif
|
||||||
|
# if defined (__s390__) || defined (__s390x__)
|
||||||
|
-# define DEFAULT_TTYS0 "ibm327x"
|
||||||
|
+# define DEFAULT_TTYS0 "dumb"
|
||||||
|
+# define DEFAULT_TTY32 "ibm327x"
|
||||||
|
# define DEFAULT_TTYS1 "vt220"
|
||||||
|
# endif
|
||||||
|
# ifndef DEFAULT_STERM
|
||||||
|
@@ -571,6 +572,8 @@ static void login_options_to_argv(char *
|
||||||
*argc = i;
|
*argc = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,7 +24,7 @@ have to be identified in a unique way.
|
|||||||
/* Parse command-line arguments. */
|
/* Parse command-line arguments. */
|
||||||
static void parse_args(int argc, char **argv, struct options *op)
|
static void parse_args(int argc, char **argv, struct options *op)
|
||||||
{
|
{
|
||||||
@@ -746,7 +748,7 @@ static void parse_args(int argc, char **
|
@@ -749,7 +752,7 @@ static void parse_args(int argc, char **
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Accept "tty", "baudrate tty", and "tty baudrate". */
|
/* Accept "tty", "baudrate tty", and "tty baudrate". */
|
||||||
@ -26,7 +33,7 @@ have to be identified in a unique way.
|
|||||||
/* Assume BSD style speed. */
|
/* Assume BSD style speed. */
|
||||||
parse_speeds(op, argv[optind++]);
|
parse_speeds(op, argv[optind++]);
|
||||||
if (argc < optind + 1) {
|
if (argc < optind + 1) {
|
||||||
@@ -758,7 +760,7 @@ static void parse_args(int argc, char **
|
@@ -761,7 +764,7 @@ static void parse_args(int argc, char **
|
||||||
op->tty = argv[optind++];
|
op->tty = argv[optind++];
|
||||||
if (argc > optind) {
|
if (argc > optind) {
|
||||||
char *v = argv[optind++];
|
char *v = argv[optind++];
|
||||||
@ -35,3 +42,37 @@ have to be identified in a unique way.
|
|||||||
parse_speeds(op, v);
|
parse_speeds(op, v);
|
||||||
else
|
else
|
||||||
op->speeds[op->numspeed++] = bcode("9600");
|
op->speeds[op->numspeed++] = bcode("9600");
|
||||||
|
@@ -1071,9 +1074,11 @@ static void open_tty(char *tty, struct t
|
||||||
|
* 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)
|
||||||
|
+ if (strcmp(op->tty, "ttyS0") == 0) /* linux/drivers/s390/char/con3215.c */
|
||||||
|
op->term = DEFAULT_TTYS0;
|
||||||
|
- else if (strcmp(op->tty, "ttyS1") == 0)
|
||||||
|
+ else if (strncmp(op->tty, "3270/tty", 8) == 0) /* linux/drivers/s390/char/con3270.c */
|
||||||
|
+ op->term = DEFAULT_TTY32;
|
||||||
|
+ else if (strcmp(op->tty, "ttyS1") == 0) /* linux/drivers/s390/char/sclp_vt220.c */
|
||||||
|
op->term = DEFAULT_TTYS1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
--- login-utils/sulogin.c
|
||||||
|
+++ login-utils/sulogin.c 2014-05-08 08:22:38.572781002 +0000
|
||||||
|
@@ -189,10 +189,16 @@ static void tcfinal(struct console *con)
|
||||||
|
setenv("TERM", "linux", 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
- if (con->flags & CON_NOTTY)
|
||||||
|
+ if (con->flags & CON_NOTTY) {
|
||||||
|
+ setenv("TERM", "dumb", 1);
|
||||||
|
return;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
+#if defined (__s390__) || defined (__s390x__)
|
||||||
|
+ setenv("TERM", "dumb", 1);
|
||||||
|
+#else
|
||||||
|
setenv("TERM", "vt102", 1);
|
||||||
|
+#endif
|
||||||
|
tio = &con->tio;
|
||||||
|
fd = con->fd;
|
||||||
|
|
||||||
|
@ -1,6 +1,23 @@
|
|||||||
|
---
|
||||||
|
login-utils/sulogin.c | 17 ++++++++++++-----
|
||||||
|
term-utils/agetty.c | 23 +++++++++++------------
|
||||||
|
2 files changed, 23 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
--- login-utils/sulogin.c
|
--- login-utils/sulogin.c
|
||||||
+++ login-utils/sulogin.c 2014-05-07 14:06:56.198236254 +0000
|
+++ login-utils/sulogin.c 2014-05-08 08:01:13.102622002 +0000
|
||||||
@@ -142,8 +142,11 @@ static void tcinit(struct console *con)
|
@@ -49,6 +49,11 @@
|
||||||
|
# include <selinux/get_context_list.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef __linux__
|
||||||
|
+# include <sys/kd.h>
|
||||||
|
+# include <sys/param.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include "c.h"
|
||||||
|
#include "closestream.h"
|
||||||
|
#include "nls.h"
|
||||||
|
@@ -142,10 +147,14 @@ static void tcinit(struct console *con)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13,8 +30,11 @@
|
|||||||
+ {
|
+ {
|
||||||
speed_t ispeed, ospeed;
|
speed_t ispeed, ospeed;
|
||||||
struct winsize ws;
|
struct winsize ws;
|
||||||
|
+ errno = 0;
|
||||||
|
|
||||||
@@ -191,9 +194,7 @@ static void tcinit(struct console *con)
|
/* this is a modem line */
|
||||||
|
con->flags |= CON_SERIAL;
|
||||||
|
@@ -191,9 +200,7 @@ static void tcinit(struct console *con)
|
||||||
goto setattr;
|
goto setattr;
|
||||||
}
|
}
|
||||||
#if defined(IUTF8) && defined(KDGKBMODE)
|
#if defined(IUTF8) && defined(KDGKBMODE)
|
||||||
@ -26,7 +46,7 @@
|
|||||||
case K_UNICODE:
|
case K_UNICODE:
|
||||||
setlocale(LC_CTYPE, "C.UTF-8");
|
setlocale(LC_CTYPE, "C.UTF-8");
|
||||||
--- term-utils/agetty.c
|
--- term-utils/agetty.c
|
||||||
+++ term-utils/agetty.c 2014-05-07 14:14:16.647523097 +0000
|
+++ term-utils/agetty.c 2014-05-08 08:02:16.786235584 +0000
|
||||||
@@ -139,6 +139,7 @@ struct options {
|
@@ -139,6 +139,7 @@ struct options {
|
||||||
int nice; /* Run login with this priority */
|
int nice; /* Run login with this priority */
|
||||||
int numspeed; /* number of baud rates to try */
|
int numspeed; /* number of baud rates to try */
|
||||||
@ -35,6 +55,15 @@
|
|||||||
speed_t speeds[MAX_SPEED]; /* baud rates to be tried */
|
speed_t speeds[MAX_SPEED]; /* baud rates to be tried */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -936,7 +937,7 @@ static void update_utmp(struct options *
|
||||||
|
static void open_tty(char *tty, struct termios *tp, struct options *op)
|
||||||
|
{
|
||||||
|
const pid_t pid = getpid();
|
||||||
|
- int serial, closed = 0;
|
||||||
|
+ int closed = 0;
|
||||||
|
|
||||||
|
/* Set up new standard input, unless we are given an already opened port. */
|
||||||
|
|
||||||
@@ -1080,15 +1081,18 @@ static void open_tty(char *tty, struct t
|
@@ -1080,15 +1081,18 @@ static void open_tty(char *tty, struct t
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 8 08:15:04 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
- Modify patch support-other-tty-lines-not-vconsole.patch to
|
||||||
|
make it work on virtual console
|
||||||
|
- Modify patch agetty-on-s390-on-dev-3270-tty1-line.patch
|
||||||
|
to add the missed 3270 support upstream
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 7 14:12:32 UTC 2014 - werner@suse.de
|
Wed May 7 14:12:32 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user