LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to determine cdrom devices (https://www.linuxquestions.org/questions/programming-9/how-to-determine-cdrom-devices-202887/)

Vookimedlo 07-09-2004 12:18 AM

How to determine cdrom devices
 
Hi,

Does anybody know, how to determine cdrom devices (/dev/hdb, /dev/scd0, etc.) via C/C++?


Thx in advance.

--Michal

itsme86 07-09-2004 08:52 AM

You can use the /proc fs for this:

$ cat ide/ide0/hdb/driver
ide-disk version 1.10
$ cat ide/ide1/hdd/driver
ide-cdrom version 4.59

There might be a better file to use in there. Have a look around :)


All times are GMT -5. The time now is 11:22 PM.