Differences
This shows you the differences between two versions of the page.
cdrom_id [2018/04/09 02:09] beandog created |
cdrom_id [2018/04/09 02:11] (current) beandog |
||
---|---|---|---|
Line 23: | Line 23: | ||
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 | ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 | ||
</code> | </code> | ||
+ | |||
+ | You can use it as a poor man's check for a drive status -- see if there's something in there or not. | ||
+ | |||
+ | ''ID_CDROM_MEDIA_DVD=1'' will be present if there's a DVD in there (not a CD), and ''ID_CDROM_MEDIA_STATE=complete'' will display if it's finished accessing the device. | ||
+ | |||
+ | However, just because udev is finished, doesn't mean the drive is immediately available. That's why I wrote [[dvd_drive_status]] which will check to see if it's really ready to be read. | ||
+ | |||
+ | Using [[dvd_eject]] will also wait for the drive to be ready, if you use it to close the tray: ''dvd_eject -t'' |