Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17567
b: refs/heads/master
c: f042e0f
h: refs/heads/master
i:
  17565: e04a7f4
  17563: 7a14e07
  17559: b0e7ffe
  17551: db535de
  17535: 36583f9
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Jan 10, 2006
1 parent eefd0c5 commit fc1e116
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51a990588a3e38f7963964813786fa4f0da43ecc
refs/heads/master: f042e0f80b0a9f5bb57c36d60a2798de6ca943b2
2 changes: 0 additions & 2 deletions trunk/arch/s390/kernel/compat_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ COMPATIBLE_IOCTL(BIODASDSATTR)
COMPATIBLE_IOCTL(BIODASDCMFENABLE)
COMPATIBLE_IOCTL(BIODASDCMFDISABLE)
COMPATIBLE_IOCTL(BIODASDREADALLCMB)

COMPATIBLE_IOCTL(TAPE390_DISPLAY)
};

int ioctl_table_size = ARRAY_SIZE(ioctl_start);
20 changes: 20 additions & 0 deletions trunk/drivers/s390/char/tape_char.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ static int tapechar_open(struct inode *,struct file *);
static int tapechar_release(struct inode *,struct file *);
static int tapechar_ioctl(struct inode *, struct file *, unsigned int,
unsigned long);
static long tapechar_compat_ioctl(struct file *, unsigned int,
unsigned long);

static struct file_operations tape_fops =
{
.owner = THIS_MODULE,
.read = tapechar_read,
.write = tapechar_write,
.ioctl = tapechar_ioctl,
.compat_ioctl = tapechar_compat_ioctl,
.open = tapechar_open,
.release = tapechar_release,
};
Expand Down Expand Up @@ -463,6 +466,23 @@ tapechar_ioctl(struct inode *inp, struct file *filp,
return device->discipline->ioctl_fn(device, no, data);
}

static long
tapechar_compat_ioctl(struct file *filp, unsigned int no, unsigned long data)
{
struct tape_device *device = filp->private_data;
int rval = -ENOIOCTLCMD;

if (device->discipline->ioctl_fn) {
lock_kernel();
rval = device->discipline->ioctl_fn(device, no, data);
unlock_kernel();
if (rval == -EINVAL)
rval = -ENOIOCTLCMD;
}

return rval;
}

/*
* Initialize character device frontend.
*/
Expand Down

0 comments on commit fc1e116

Please sign in to comment.