2 * Implements some necessary HPUX ioctls.
4 * Copyright (C) 1999-2002 Matthew Wilcox <willy with parisc-linux.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
36 #include <linux/sched.h>
37 #include <linux/syscalls.h>
38 #include <asm/errno.h>
39 #include <asm/ioctl.h>
40 #include <asm/termios.h>
41 #include <asm/uaccess.h>
43 static int hpux_ioctl_t(int fd, unsigned long cmd, unsigned long arg)
45 int result = -EOPNOTSUPP;
46 int nr = _IOC_NR(cmd);
49 result = sys_ioctl(fd, TIOCSWINSZ, arg);
52 result = sys_ioctl(fd, TIOCGWINSZ, arg);
58 int hpux_ioctl(int fd, unsigned long cmd, unsigned long arg)
60 int result = -EOPNOTSUPP;
61 int type = _IOC_TYPE(cmd);
64 /* Our structures are now compatible with HPUX's */
65 result = sys_ioctl(fd, cmd, arg);
68 result = hpux_ioctl_t(fd, cmd, arg);