Hi,
can any SCSI-Expert out there help me?
All I want to do is finding to a specific generic device its host,id,lun
and channel.
I found the SCSI_IOCTL_GET_IDLUN very helpful, but this does not output
the host...at least not in a format I understand it.
Here is my simple test-programm:
-------------
#include <stdio.h>
#include <scsi/scsi.h>
struct sg_id {
long l1; /* target | lun << 8 | channel << 16 | low_ino << 24
*/
long l2; /* Unique id */
main() {Quote:} sg_id;
int fd;
fd = open ("/dev/sg0",2);
ioctl(fd, SCSI_IOCTL_GET_IDLUN, &sg_id);
close(fd);
printf("l1: 0x%lX l2: 0x%lX\n", sg_id.l1, sg_id.l2);
---------Quote:}
When I run it I get:
l1: 0x7000000 l2: 0x0
Fine..this means my device /dev/sg0 is ID 0, Lun 0, Channel 0. Very good
so far...but what does the "low_ino" of 0x07 mean?
Is there a way to conclude from the 0x07 to Host 0?
I have run this programm for different devices on linux (all 2.0.x) with
more than one controllers:
-> For different controllers the low_ino changes, with seems to be fine, but
I still dont know which low_ino corresponds to which host!
Thanx for any answer,
Thomas
___ ___
/ | \ ___________ | REAL : Thomas Niederreiter: Munich, Germany
\ Y ( <_> ) | \/ | MUD/IRC: Hor/_Hor
\___|_ / \____/|__| |
\/ All I want is a warm bed and a kind word and unlimited power
-- Ashleigh Brilliant