* mapping from scsi Host/Chan/Id/Lun to /dev/foo
@ 2002-05-11 21:23 Jeff Meininger
2002-05-11 23:13 ` Erik Andersen
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Meininger @ 2002-05-11 21:23 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mapping from scsi Host/Chan/Id/Lun to /dev/foo
2002-05-11 21:23 mapping from scsi Host/Chan/Id/Lun to /dev/foo Jeff Meininger
@ 2002-05-11 23:13 ` Erik Andersen
0 siblings, 0 replies; 2+ messages in thread
From: Erik Andersen @ 2002-05-11 23:13 UTC (permalink / raw)
To: Jeff Meininger; +Cc: linux-kernel
On Sat May 11, 2002 at 04:23:03PM -0500, Jeff Meininger wrote:
>
> 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.
Grab a copy of sg3-utils and read show_devices() in sginfo.c
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-11 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-11 21:23 mapping from scsi Host/Chan/Id/Lun to /dev/foo Jeff Meininger
2002-05-11 23:13 ` Erik Andersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox