aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pty.c')
-rw-r--r--drivers/char/pty.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index d083c73d784a..b33d6688e910 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -109,21 +109,13 @@ static int pty_space(struct tty_struct *to)
109 * the other side of the pty/tty pair. 109 * the other side of the pty/tty pair.
110 */ 110 */
111 111
112static int pty_write(struct tty_struct *tty, const unsigned char *buf, 112static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
113 int count)
114{ 113{
115 struct tty_struct *to = tty->link; 114 struct tty_struct *to = tty->link;
116 int c;
117 115
118 if (tty->stopped) 116 if (tty->stopped)
119 return 0; 117 return 0;
120 118
121 /* This isn't locked but our 8K is quite sloppy so no
122 big deal */
123
124 c = pty_space(to);
125 if (c > count)
126 c = count;
127 if (c > 0) { 119 if (c > 0) {
128 /* Stuff the data into the input queue of the other end */ 120 /* Stuff the data into the input queue of the other end */
129 c = tty_insert_flip_string(to, buf, c); 121 c = tty_insert_flip_string(to, buf, c);