Skip to contentSkip to conversation

List of Optical devices.

DISCUSSION Tom Gaudasinski 2 participants 2 messages Jun 11, 2006

lore
Share & tools
lore
#0 lore raw

Greetings,
I would like to get a list of all the optical drives registered. I
see that in <linux/cdrom.h> there is a register_cdrom() function, and an unregister variant. Nowhere do i see however a way to get a list of these devices. I understand that they form a linked list, so getting the first one would be peachy enough, yet again I can't find such functionality. Currently what I'm doing is parsing the text out of /proc/sys/dev/cdrom/info, which is cumbersome. However due to the fact that a file in proc can produce this, i assume there's a way to get that list. How may I do so? All i need are the device names so that I may send some ioctls to them.

Thank you.

P.S.
I am not subscribed to the mailing list, please CC me a copy of any replies.

#1 lore raw
Quoted 3 lines · Tom Gaudasinski

I would like to get a list of all the optical drives registered.

From userspace or kernelmode?

Gruss
Bernd