X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fs390%2Fchar%2Ftty3270.c;h=5043150019ac0788e91d4a42ee1d49955c99d527;hb=854a989546c12683186c84601d4902591dddd8a9;hp=70b1980a08b66380c075355d81101c90a784032f;hpb=364c85584e030f7cfc25e9d27ca893dee6f4bf8e;p=linux-2.6 diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 70b1980a08..5043150019 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -965,8 +965,7 @@ tty3270_write_room(struct tty_struct *tty) * Insert character into the screen at the current position with the * current color and highlight. This function does NOT do cursor movement. */ -static void -tty3270_put_character(struct tty3270 *tp, char ch) +static void tty3270_put_character(struct tty3270 *tp, char ch) { struct tty3270_line *line; struct tty3270_cell *cell; @@ -1611,16 +1610,15 @@ tty3270_write(struct tty_struct * tty, /* * Put single characters to the ttys character buffer */ -static void -tty3270_put_char(struct tty_struct *tty, unsigned char ch) +static int tty3270_put_char(struct tty_struct *tty, unsigned char ch) { struct tty3270 *tp; tp = tty->driver_data; - if (!tp) - return; - if (tp->char_count < TTY3270_CHAR_BUF_SIZE) - tp->char_buf[tp->char_count++] = ch; + if (!tp || tp->char_count >= TTY3270_CHAR_BUF_SIZE) + return 0; + tp->char_buf[tp->char_count++] = ch; + return 1; } /*