diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-26 20:50:23 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-26 20:50:23 (GMT) |
commit | 68e370289c29e3beac99d59c6d840d470af9dfcf (patch) | |
tree | f37cd93ef5033687402a08ec29760b8cc65f240a /drivers | |
parent | ac490f4dca9476bf8a309a2cae92ca68b8c5fca6 (diff) | |
parent | b8a2bbdf02b8c25f7eecce001bcc249a3b65c1b5 (diff) | |
download | linux-68e370289c29e3beac99d59c6d840d470af9dfcf.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky:
- wire up the system calls seccomp, getrandom and memfd_create
- use static system information as input to add_device_randomness
- .. and three bug fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/sclp: remove unnecessary XTABS flag
s390/3215: fix tty output containing tabs
s390: wire up memfd_create syscall
s390: add system information as device randomness
s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL
s390: wire up seccomp and getrandom syscalls
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/char/con3215.c | 20 | ||||
-rw-r--r-- | drivers/s390/char/sclp_tty.c | 2 |
2 files changed, 18 insertions, 4 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index a6d47e5..c43aca6 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -1035,12 +1035,26 @@ static int tty3215_write(struct tty_struct * tty, const unsigned char *buf, int count) { struct raw3215_info *raw; + int i, written; if (!tty) return 0; raw = (struct raw3215_info *) tty->driver_data; - raw3215_write(raw, buf, count); - return count; + written = count; + while (count > 0) { + for (i = 0; i < count; i++) + if (buf[i] == '\t' || buf[i] == '\n') + break; + raw3215_write(raw, buf, i); + count -= i; + buf += i; + if (count > 0) { + raw3215_putchar(raw, *buf); + count--; + buf++; + } + } + return written; } /* @@ -1188,7 +1202,7 @@ static int __init tty3215_init(void) driver->subtype = SYSTEM_TYPE_TTY; driver->init_termios = tty_std_termios; driver->init_termios.c_iflag = IGNBRK | IGNPAR; - driver->init_termios.c_oflag = ONLCR | XTABS; + driver->init_termios.c_oflag = ONLCR; driver->init_termios.c_lflag = ISIG; driver->flags = TTY_DRIVER_REAL_RAW; tty_set_operations(driver, &tty3215_ops); diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 7ed7a59..0036632 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -559,7 +559,7 @@ sclp_tty_init(void) driver->subtype = SYSTEM_TYPE_TTY; driver->init_termios = tty_std_termios; driver->init_termios.c_iflag = IGNBRK | IGNPAR; - driver->init_termios.c_oflag = ONLCR | XTABS; + driver->init_termios.c_oflag = ONLCR; driver->init_termios.c_lflag = ISIG | ECHO; driver->flags = TTY_DRIVER_REAL_RAW; tty_set_operations(driver, &sclp_ops); |