/* 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)
/* 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;
	if (buffer) {
		if (get_user(len, (unsigned int __user *) buffer))
			return -EFAULT;
		if (host->hostt->info)
			string = host->hostt->info(host);
		else
			string = host->hostt->name;
		if (string) {
			slen = strlen(string);
			if (len > slen)
				len = slen + 1;
			if (copy_to_user(buffer, string, len))
				return -EFAULT;
		}
	}
	return 1;
}