Return 0 instead of -EINVAL if the blkfront device is a cdrom,
i.e. had the VDISK_CDROM attribute. This allows udev's cdrom_id
to correctly detect the device as a cdrom device.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
return -EFAULT;
return 0;
+ case CDROM_GET_CAPABILITY: {
+ struct blkfront_info *info =
+ inode->i_bdev->bd_disk->private_data;
+ struct gendisk *gd = info->gd;
+ if (gd->flags & GENHD_FL_CD)
+ return 0;
+ return -EINVAL;
+ }
default:
/*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n",
command);*/