Bug 41752 - Property 'DeviceIsOpticalDisc' requiring media be inserted to be true makes it difficult to find optical drives.
Summary: Property 'DeviceIsOpticalDisc' requiring media be inserted to be true makes i...
Status: RESOLVED WORKSFORME
Alias: None
Product: udisks
Classification: Unclassified
Component: detection (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 09:52 UTC by Richard
Modified: 2012-09-28 16:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Richard 2011-10-13 09:52:43 UTC
Summary pretty much sums it up.

Why does the property 'DeviceIsOpticalDisc' require that media be inserted to be TRUE?

This forces me to check for the string 'optical' in the array 'DriveMediaCompatibility' to know if I'm dealing with an optical device.

I guess I can test for 'DeviceMajor' == 11, but that's not terribly intuitive.
Comment 1 David Zeuthen (not reading bugmail) 2012-09-28 16:10:39 UTC
The way to do this is to examine what kinds of media the drive is compatible with. In udisks 2.0 you'd look at this property

 http://udisks.freedesktop.org/docs/latest/gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.MediaCompatibility

and see if any of the values in the array are prefixed with "optical". Closing WORKSFORME.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.