HAL depreciated, but what replaced it?
hobbes1069 at gmail.com
Thu Oct 13 00:44:54 UTC 2011
I'm the maintainer of a (relatively) simple python utility called
discspan which I'd like to package for Fedora.
It currently relies on HAL via dbus to determine when media is loaded
and its capacity. I'm trying to remove the dependency on HAL since
it's been depreciated for some time but the dbus UDisks interface
seems to be lacking in several ways.
For one, there doesn't appear to be an easy way to determine which
devices are CD/DVD writers (or even readers). It has a boolean
property called "DeviceIsOpticalDisc" that looked promising but it
only reports true if the device is an optical drive AND there's a disc
inserted. In HAL I used FindDeviceByCapability which narrowed things
I've worked around that for testing the property
"DriveMediaCompatibility" > 0 since it returns an array but this would
also pick up flash card readers, zip, and jaz drives. I'll have to
modify that to look for "optical" on the front of any members of the
Second, I can not find any property that reports the disc capacity.
The only property that looked close is "DriveSize" but for a blank
disc this reports the same as the SectorSize, 2048.
The documentation is horrible and the only reason I got this far was
thinks to a howto I found.
Any pointers would be appreciated.
More information about the devel