List of Optical devices.

From: Tom Gaudasinski
Date: Sun Jun 11 2006 - 03:42:11 EST


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/