summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-09-06 14:03:44 +0200
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-06 17:25:16 -0500
commit32993523dc59759ae6cb349e4d231d4cd2165329 (patch)
treecefbe293f78922658232f44eafd17e29714bd9fe /drivers/scsi/scsi_ioctl.c
parent4869040512082b761de2d7c35975d01044f8bfea (diff)
downloadlinux-stable-32993523dc59759ae6cb349e4d231d4cd2165329.tar.gz
linux-stable-32993523dc59759ae6cb349e4d231d4cd2165329.tar.bz2
linux-stable-32993523dc59759ae6cb349e4d231d4cd2165329.zip
[SCSI] fix SCSI_IOCTL_PROBE_HOST
This returns always false with new-style drivers right now. Make it return always true instead, as a host must be present if we are able to call the ioctl (without a host attached there would be no device node to call on..) Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r--drivers/scsi/scsi_ioctl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index f5bf5c07be91..946c31fa6466 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -30,20 +30,20 @@
#define MAX_BUF PAGE_SIZE
-/*
- * If we are told to probe a host, we will return 0 if the host is not
- * present, 1 if the host is present, and will return an identifying
- * string at *arg, if arg is non null, filling to the length stored at
- * (int *) arg
+/**
+ * ioctl_probe -- return host identification
+ * @host: host to identify
+ * @buffer: userspace buffer for identification
+ *
+ * Return an identifying string at @buffer, if @buffer is non-NULL, filling
+ * to the length stored at * (int *) @buffer.
*/
-
static int ioctl_probe(struct Scsi_Host *host, void __user *buffer)
{
unsigned int len, slen;
const char *string;
- int temp = host->hostt->present;
- if (temp && buffer) {
+ if (buffer) {
if (get_user(len, (unsigned int __user *) buffer))
return -EFAULT;
@@ -59,7 +59,7 @@ static int ioctl_probe(struct Scsi_Host *host, void __user *buffer)
return -EFAULT;
}
}
- return temp;
+ return 1;
}
/*