This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [linux-2.6.18-xen] Add the CDROM_GET_CAPABILITY ioctl to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Add the CDROM_GET_CAPABILITY ioctl to blkfront.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Sep 2007 21:10:16 -0700
Delivery-date: Tue, 11 Sep 2007 21:10:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Date 1189525093 -3600
# Node ID d2bd9af846b5c3fbb8879a01a29cdfc44dc84f66
# Parent  099625b07ae7ea3343b7842b2148dc2125ca14eb
Add the CDROM_GET_CAPABILITY ioctl to blkfront.
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@xxxxxxxxxxxxx>
 drivers/xen/blkfront/blkfront.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r 099625b07ae7 -r d2bd9af846b5 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c   Mon Sep 10 13:59:28 2007 -0600
+++ b/drivers/xen/blkfront/blkfront.c   Tue Sep 11 16:38:13 2007 +0100
@@ -521,6 +521,14 @@ int blkif_ioctl(struct inode *inode, str
                                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;
+       }
                /*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n",

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Add the CDROM_GET_CAPABILITY ioctl to blkfront., Xen patchbot-linux-2.6.18-xen <=