fix identify empty optical drive

This commit is contained in:
IgnorantGuru 2013-11-19 04:55:46 -07:00
parent 7c5f44d968
commit 70e61cf588
2 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@
improve denied 94 msg #24
default fmask=0133 for vfat ntfs msdos umsdos #25
[devmon 1.1.7] support raid /dev/mda in partition detection #28
fix identify empty optical drive
0.4.1 2013-03-17:
update Russian translation
added translation files to transifex.com

View File

@ -1174,7 +1174,9 @@ void info_optical_disc( device_t *device )
{
const char *cdrom_disc_state;
if ( udev_device_get_property_value( device->udevice, "ID_CDROM_MEDIA") )
const char* optical_state = udev_device_get_property_value( device->udevice,
"ID_CDROM");
if ( optical_state && atoi( optical_state ) != 0 )
{
device->device_is_optical_disc = TRUE;