Skip to contentSkip to conversation

is there a disc in the drive?

DISCUSSION Adam Hunt 2 participants 2 messages Dec 23, 2002 – Dec 24, 2002

lore
Share & tools
lore

Adam Hunt

author
#0 lore raw

Is there a simple way of determining if there is a disc in a CD/DVD drive? Something in /proc would be nice. Is there any other sort of information availble such as what type of disc is in the drive?

--adam

Signature · 2 lines
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
#1 lore raw

Hi

open the cd drive in non blocking mode then
do some ioctls to get the info you require.

or cdrecord i think has an option to dump the info.

Quoted 4 lines · Adam Hunt

Is there a simple way of determining if there is a disc in a CD/DVD drive? Something in /proc would be nice. Is there any other sort of information availble such as what type of disc is in the drive?