LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



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

Rep: Reputation: 33
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
 
Old 07-09-2004, 09:52 AM   #2
itsme86
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
 
  


Reply


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


All times are GMT -5. The time now is 12:41 PM.

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