1
0
forked from pool/util-linux
Dr. Werner Fink 2014-02-03 16:17:17 +00:00 committed by Git OBS Bridge
parent 041eeaa17d
commit 7a6a2e8526
3 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,33 @@
--- term-utils/agetty.c
+++ term-utils/agetty.c 2014-02-03 16:08:55.446235045 +0000
@@ -571,6 +571,7 @@ static void login_options_to_argv(char *
/* Parse command-line arguments. */
static void parse_args(int argc, char **argv, struct options *op)
{
+ char *ptr;
int c;
enum {
@@ -745,8 +746,13 @@ static void parse_args(int argc, char **
usage(stderr);
}
+ c = asprintf(ptr, "/dev/%s", argv[optind]);
+ if (c < 0)
+ log_err(_("failed to allocate memory: %m"));
+
/* Accept "tty", "baudrate tty", and "tty baudrate". */
- if ('0' <= argv[optind][0] && argv[optind][0] <= '9') {
+ if (access(ptr, F_OK) < 0) {
+ errno = 0;
/* Assume BSD style speed. */
parse_speeds(op, argv[optind++]);
if (argc < optind + 1) {
@@ -764,6 +770,7 @@ static void parse_args(int argc, char **
op->speeds[op->numspeed++] = bcode("9600");
}
}
+ free(ptr);
/* On virtual console remember the line which is used for */
if (strncmp(op->tty, "tty", 3) == 0 &&

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 3 16:16:36 UTC 2014 - werner@suse.de
- Add patch agetty-on-s390-on-dev--3270-tty1-line.patch
to let agetty detect /dev/3270/tty1 as device not as baud rate
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com Tue Jan 28 09:37:57 UTC 2014 - speilicke@suse.com

View File

@ -110,6 +110,8 @@ Patch13: blkdiscard-BLKSSZGET-fills-in-an-int.patch
Patch14: tty3270-on-serial-line-of-s390.patch Patch14: tty3270-on-serial-line-of-s390.patch
# PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture # PATCH-FIX-SUSE -- Let agetty not be fooled by locked termios srtucture
Patch15: agetty-fooled-on-serial-line-due-plymouth.patch Patch15: agetty-fooled-on-serial-line-due-plymouth.patch
# PATCH-FIX-SUSE -- Let agetty detect /dev/3270/tty1 as device not as baud rate
Patch16: agetty-on-s390-on-dev--3270-tty1-line.patch
# hack for boot.localfs # hack for boot.localfs
Patch20: util-linux-HACK-boot.localfs.diff Patch20: util-linux-HACK-boot.localfs.diff
@ -229,6 +231,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} -
%patch13 -p1 %patch13 -p1
%patch14 -p0 %patch14 -p0
%patch15 -p0 %patch15 -p0
%patch16 -p0
# #
%patch20 -p1 %patch20 -p1
# #