mapping from scsi Host/Chan/Id/Lun to /dev/foo

Jeff Meininger (jeffm@boxybutgood.com)
Sat, 11 May 2002 16:23:03 -0500 (CDT)


I'm trying to write a userspace program that takes Host/Chan/Id/Lun
arguments for some sort of scsi storage device and prints out the
corresponding /dev entry, if one exists.

This is easy to do with devfs... assuming SCSI 0 0 0 0, the program can
simply look in /dev/scsi/host0/bus0/target0/lun0/ for 'cd' or 'disc', etc.

Without devfs, though, I can't figure out how to map 0 0 0 0 to /dev/scd0,
/dev/sr0, or /dev/sda, etc.

I hope I haven't missed anything obvious in the ioctl commands in the .h
files, /proc, etc...

I'm not subscribed to LKML, so I would appreciate it if you'd Cc me in
your reply!

Thanks!
-Jeff Meininer

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/