Detecting proper device for /dev/dvd

From: Stephen Torri (storri@sbcglobal.net)
Date: Sat Oct 19 2002 - 00:07:03 EST


On my RedHat 8.0 system the DVD/CDRW drive is handle by the ide-scsi
module. So the link /dev/dvd points to /dev/scd0. The interface that
handles /dev/dvd is actual the IDE interface on the motherboard. So
/dev/hdc is the proper link for /dev/dvd. The reason I go into this is
because I am writing a piece of C code that is suppose to detect if DMA
is turned on for the DVD/CDRW drive. This is important for playing DVDs.
What is the best method I should go about doing this?

So far my guesses are

1) Hard code the link (only good for my system so not the ideal
solution). This is only good so far to prove that the DMA detection
works.

2) Use the /proc system to discover the proper /dev link. So far this
has provides confusing since I am not that sure of how to use the
information.

3) Require the user to edit the program's configuration file. Not the
ideal since I would like to make this as easy as possible for
non-technical or novice users of the program.

Ideas, links, documentation and examples are welcome.

Stephen



-
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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:46 EST