[9293] in linux-scsi channel archive
Re: finding target id of a scsi device
daemon@ATHENA.MIT.EDU (Douglas Gilbert)
Fri Aug 4 03:01:02 2000
Message-ID: <398A1DF0.F1E887A@interlog.com>
Date: Thu, 03 Aug 2000 21:35:44 -0400
From: Douglas Gilbert <dgilbert@interlog.com>
MIME-Version: 1.0
To: BenHanokh Gabriel <gabriel@SANgate.com>
CC: "linux-scsi@vger.rutgers.edu" <linux-scsi@vger.rutgers.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
BenHanokh Gabriel wrote:
>
> hi
>
> is there a way in user-space to map from the dev_t ( retrive from
> stat(2) ) to the scsi target & logical ids?
> if no can i do it in kernel-space ?
With an open file descriptor to a SCSI device the
SCSI_IOCTL_GET_IDLUN ioctl() can be used.
The struct associated with this ioctl() is
described in:
http://www.torque.net/scsi/linux_scsi_24
You may also be able to deduce it from looking at
'cat /proc/scsi/scsi' [but that is a bit hard to
parse].
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu