diff options
author | Alan Cox <alan@redhat.com> | 2008-08-15 05:39:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 13:34:07 -0400 |
commit | 8c9a9dd0fa3a269d380eaae2dc1bee39e865fae1 (patch) | |
tree | c4617de83246eb6b7ed9c125c5777f05b445c975 /include/linux/tty_driver.h | |
parent | 21d3bdb1606311a2900eabccfcb5a887952e2c44 (diff) |
tty: remove resize window special case
This moves it to being a tty operation. That removes special cases and now
also means that resize can be picked up by um and other non vt consoles
which may have a resize operation.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r-- | include/linux/tty_driver.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index e1065ac0d922..16d27944c321 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -168,6 +168,18 @@ | |||
168 | * | 168 | * |
169 | * Optional: If not provided then the write method is called under | 169 | * Optional: If not provided then the write method is called under |
170 | * the atomic write lock to keep it serialized with the ldisc. | 170 | * the atomic write lock to keep it serialized with the ldisc. |
171 | * | ||
172 | * int (*resize)(struct tty_struct *tty, struct tty_struct *real_tty, | ||
173 | * unsigned int rows, unsigned int cols); | ||
174 | * | ||
175 | * Called when a termios request is issued which changes the | ||
176 | * requested terminal geometry. | ||
177 | * | ||
178 | * Optional: the default action is to update the termios structure | ||
179 | * without error. This is usually the correct behaviour. Drivers should | ||
180 | * not force errors here if they are not resizable objects (eg a serial | ||
181 | * line). See tty_do_resize() if you need to wrap the standard method | ||
182 | * in your own logic - the usual case. | ||
171 | */ | 183 | */ |
172 | 184 | ||
173 | #include <linux/fs.h> | 185 | #include <linux/fs.h> |
@@ -206,6 +218,8 @@ struct tty_operations { | |||
206 | int (*tiocmget)(struct tty_struct *tty, struct file *file); | 218 | int (*tiocmget)(struct tty_struct *tty, struct file *file); |
207 | int (*tiocmset)(struct tty_struct *tty, struct file *file, | 219 | int (*tiocmset)(struct tty_struct *tty, struct file *file, |
208 | unsigned int set, unsigned int clear); | 220 | unsigned int set, unsigned int clear); |
221 | int (*resize)(struct tty_struct *tty, struct tty_struct *real_tty, | ||
222 | struct winsize *ws); | ||
209 | #ifdef CONFIG_CONSOLE_POLL | 223 | #ifdef CONFIG_CONSOLE_POLL |
210 | int (*poll_init)(struct tty_driver *driver, int line, char *options); | 224 | int (*poll_init)(struct tty_driver *driver, int line, char *options); |
211 | int (*poll_get_char)(struct tty_driver *driver, int line); | 225 | int (*poll_get_char)(struct tty_driver *driver, int line); |