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