diff options
Diffstat (limited to 'sys/compat/svr4/svr4_termios.c')
-rw-r--r-- | sys/compat/svr4/svr4_termios.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/compat/svr4/svr4_termios.c b/sys/compat/svr4/svr4_termios.c index b9c4a2f8b6e..e00a0d80ddc 100644 --- a/sys/compat/svr4/svr4_termios.c +++ b/sys/compat/svr4/svr4_termios.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_termios.c,v 1.6 1995/10/14 20:24:58 christos Exp $ */ +/* $NetBSD: svr4_termios.c,v 1.8 1996/03/30 22:38:23 christos Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -541,8 +541,27 @@ svr4_termioctl(fp, cmd, data, p, retval) return (*ctl)(fp, cmd, (caddr_t) &bt, p); + case SVR4_TIOCGWINSZ: + { + struct svr4_winsize ws; + + error = (*ctl)(fp, TIOCGWINSZ, (caddr_t) &ws, p); + if (error) + return error; + return copyout(&st, data, sizeof(st)); + } + + case SVR4_TIOCSWINSZ: + { + struct svr4_winsize ws; + + if ((error = copyin(data, &ws, sizeof(ws))) != 0) + return error; + return (*ctl)(fp, TIOCSWINSZ, (caddr_t) &ws, p); + } + default: - DPRINTF(("Unknown svr4 termios %x\n", cmd)); + DPRINTF(("Unknown svr4 termios %lx\n", cmd)); return ENOSYS; } } |