Download your favorite Linux distribution at LQ ISO.
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, 12:18 AM   #1
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 33
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, 08:52 AM   #2
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 58
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 01:06 PM
sysfs and udev lost my cdrom devices cexshun Linux - Hardware 0 09-11-2004 06:23 PM
Devices ,cdrom,floppy , no mount or read priv. mickeyboa Fedora 1 09-05-2004 10:46 AM
determine type of device for USB devices lyar1031 Linux - Newbie 2 07-29-2004 08:02 PM
Recording CDs using CDRW and CDROM devices humaneasy Mandriva 8 09-04-2003 06:59 AM

All times are GMT -5. The time now is 12:25 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