Commit 9e175831 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: remove useless ioctls

The UML block driver had some useless ioctls in it somehow.  This gets rid of
them.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ce5cd371
...@@ -1064,7 +1064,6 @@ static int ubd_ioctl(struct inode * inode, struct file * file, ...@@ -1064,7 +1064,6 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
{ {
struct hd_geometry *loc = (struct hd_geometry *) arg; struct hd_geometry *loc = (struct hd_geometry *) arg;
struct ubd *dev = inode->i_bdev->bd_disk->private_data; struct ubd *dev = inode->i_bdev->bd_disk->private_data;
int err;
struct hd_driveid ubd_id = { struct hd_driveid ubd_id = {
.cyls = 0, .cyls = 0,
.heads = 128, .heads = 128,
...@@ -1082,32 +1081,6 @@ static int ubd_ioctl(struct inode * inode, struct file * file, ...@@ -1082,32 +1081,6 @@ static int ubd_ioctl(struct inode * inode, struct file * file,
g.start = get_start_sect(inode->i_bdev); g.start = get_start_sect(inode->i_bdev);
return(copy_to_user(loc, &g, sizeof(g)) ? -EFAULT : 0); return(copy_to_user(loc, &g, sizeof(g)) ? -EFAULT : 0);
case HDIO_SET_UNMASKINTR:
if(!capable(CAP_SYS_ADMIN)) return(-EACCES);
if((arg > 1) || (inode->i_bdev->bd_contains != inode->i_bdev))
return(-EINVAL);
return(0);
case HDIO_GET_UNMASKINTR:
if(!arg) return(-EINVAL);
err = verify_area(VERIFY_WRITE, (long *) arg, sizeof(long));
if(err)
return(err);
return(0);
case HDIO_GET_MULTCOUNT:
if(!arg) return(-EINVAL);
err = verify_area(VERIFY_WRITE, (long *) arg, sizeof(long));
if(err)
return(err);
return(0);
case HDIO_SET_MULTCOUNT:
if(!capable(CAP_SYS_ADMIN)) return(-EACCES);
if(inode->i_bdev->bd_contains != inode->i_bdev)
return(-EINVAL);
return(0);
case HDIO_GET_IDENTITY: case HDIO_GET_IDENTITY:
ubd_id.cyls = dev->size / (128 * 32 * 512); ubd_id.cyls = dev->size / (128 * 32 * 512);
if(copy_to_user((char *) arg, (char *) &ubd_id, if(copy_to_user((char *) arg, (char *) &ubd_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment