From: Mike Miller Date: Mon, 27 Jun 2005 21:36:50 +0000 (-0700) Subject: [PATCH] cciss: remove partition info from CCISS_GETLUNINFO X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60564a313a5738960064d6c555ec066d9332f278;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] cciss: remove partition info from CCISS_GETLUNINFO This patch fulfills a promise I made to Christoph sometime back. I am removing the partition info from the CCISS_GETLUNINFO ioctl as I was informed my "driver had no damn business reading that structure." ;) The application folks are to use /proc or /sys for partition info from now on. I am only aware of a few apps that use this ioctl and I'm not sure they ever used the partition info. Signed-off-by: Mike Miller Acked-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index d5d0fa538f12..653512b77570 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -791,13 +791,6 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, luninfo.LunID = drv->LunID; luninfo.num_opens = drv->usage_count; luninfo.num_parts = 0; - /* count partitions 1 to 15 with sizes > 0 */ - for (i = 0; i < MAX_PART - 1; i++) { - if (!disk->part[i]) - continue; - if (disk->part[i]->nr_sects != 0) - luninfo.num_parts++; - } if (copy_to_user(argp, &luninfo, sizeof(LogvolInfo_struct))) return -EFAULT;