Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-09-2004, 01:18 AM   #1
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 34
How to determine cdrom devices


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

Thx in advance.

Old 07-09-2004, 09:52 AM   #2
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dvd and cdrom devices Kroenecker Fedora 3 12-22-2004 02:06 PM
sysfs and udev lost my cdrom devices cexshun Linux - Hardware 0 09-11-2004 07:23 PM
Devices ,cdrom,floppy , no mount or read priv. mickeyboa Fedora 1 09-05-2004 11:46 AM
determine type of device for USB devices lyar1031 Linux - Newbie 2 07-29-2004 09:02 PM
Recording CDs using CDRW and CDROM devices humaneasy Mandriva 8 09-04-2003 07:59 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration