提交 60564a31 编写于 作者: M Mike Miller 提交者: Linus Torvalds

[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: NMike Miller <mike.miller@hp.com>
Acked-by: NJeff Garzik <jgarzik@pobox.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 cd6fb584
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册