ia64/xen-unstable

changeset 821:f0194709226e

bitkeeper revision 1.506 (3f88167eEXnAd-cmzFGwEPmqdJEKDg)

xl_block.c:
Remove bogus permission checks from xlblk ioctl.
author kaf24@scramble.cl.cam.ac.uk
date Sat Oct 11 14:41:02 2003 +0000 (2003-10-11)
parents f8c20f68e4d5
children c980231846cc
files xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c
line diff
     1.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c	Sat Oct 11 14:22:50 2003 +0000
     1.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c	Sat Oct 11 14:41:02 2003 +0000
     1.3 @@ -152,11 +152,6 @@ int xenolinux_block_release(struct inode
     1.4      return 0;
     1.5  }
     1.6  
     1.7 -/*
     1.8 - * handle ioctl calls
     1.9 - *
    1.10 - * individual ioctls are defined in /usr/include/linux/fs.h
    1.11 - */
    1.12  
    1.13  int xenolinux_block_ioctl(struct inode *inode, struct file *filep,
    1.14  			  unsigned command, unsigned long argument)
    1.15 @@ -165,13 +160,9 @@ int xenolinux_block_ioctl(struct inode *
    1.16      struct hd_geometry *geo = (struct hd_geometry *)argument;
    1.17      struct gendisk *gd;     
    1.18      struct hd_struct *part; 
    1.19 -    
    1.20 -    DPRINTK("xenolinux_block_ioctl\n"); 
    1.21  
    1.22 -    /* check permissions */
    1.23 -    if (!capable(CAP_SYS_ADMIN)) return -EPERM;
    1.24 -    if (!inode)                  return -EINVAL;
    1.25 -
    1.26 +    /* NB. No need to check permissions. That is done for us. */
    1.27 +    
    1.28      DPRINTK_IOCTL("command: 0x%x, argument: 0x%lx, dev: 0x%04x\n",
    1.29                    command, (long) argument, dev); 
    1.30    
    1.31 @@ -248,7 +239,7 @@ int xenolinux_block_ioctl(struct inode *
    1.32  	return 0;
    1.33  
    1.34      case CDROMMULTISESSION:
    1.35 -        printk("FIXME: support multisession CDs later\n");
    1.36 +        DPRINTK("FIXME: support multisession CDs later\n");
    1.37          memset((struct cdrom_multisession *)argument, 0, 
    1.38                 sizeof(struct cdrom_multisession));
    1.39          return 0;