]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/s390/kernel/compat_ioctl.c
[PATCH] add ->compat_ioctl to dasd
[mirror_ubuntu-artful-kernel.git] / arch / s390 / kernel / compat_ioctl.c
CommitLineData
1da177e4
LT
1/*
2 * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
3 *
4 * S390 version
5 * Copyright (C) 2000-2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Gerhard Tonn (ton@de.ibm.com)
7 * Arnd Bergmann (arndb@de.ibm.com)
8 *
9 * Original implementation from 32-bit Sparc compat code which is
10 * Copyright (C) 2000 Silicon Graphics, Inc.
11 * Written by Ulf Carlsson (ulfc@engr.sgi.com)
12 */
13
14#include "compat_linux.h"
15#define INCLUDES
16#define CODE
17#include "../../../fs/compat_ioctl.c"
18#include <asm/dasd.h>
4beb3709 19#include <asm/cmb.h>
1da177e4 20#include <asm/tape390.h>
ed3cb6f0
RH
21#include <asm/ccwdev.h>
22#include "../../../drivers/s390/char/raw3270.h"
1da177e4
LT
23
24static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd,
25 unsigned long arg, struct file *f)
26{
27 return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg));
28}
29
30static int do_ioctl32_ulong(unsigned int fd, unsigned int cmd,
31 unsigned long arg, struct file *f)
32{
33 return sys_ioctl(fd, cmd, arg);
34}
35
36#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)do_ioctl32_pointer)
37#define ULONG_IOCTL(cmd) HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)do_ioctl32_ulong)
38#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL },
39
40struct ioctl_trans ioctl_start[] = {
41/* architecture independent ioctls */
42#include <linux/compat_ioctl.h>
43#define DECLARES
44#include "../../../fs/compat_ioctl.c"
1da177e4
LT
45};
46
47int ioctl_table_size = ARRAY_SIZE(ioctl_start);