HAL depreciated, but what replaced it?

Richard Shaw hobbes1069 at gmail.com
Thu Oct 13 16:59:32 UTC 2011

On Thu, Oct 13, 2011 at 11:17 AM, Stanislav Ochotnicky
<sochotnicky at redhat.com> wrote:
> Excerpts from Richard Shaw's message of Thu Oct 13 16:13:00 +0200 2011:
>> On Wed, Oct 12, 2011 at 8:16 PM, Dan Williams <dcbw at redhat.com> wrote:
>> > udev replaced HAL, along with some additional helpers.  udev has a
>> > database too, much like HAL.  You can use libudev or libgudev (if you
>> > use glib) to talk to udev and get information.
>> Ok, I found python-gudev which lets me talk to udev!
>> And I thought the documentation on UDisks was poor. The only
>> documentation in the package is a README file with a bad link and a
>> test program.
> You can use [1] (or look in your kernel source directory) for gudev
> API documentation. The python wrapper basically does 1:1 copy of the
> functions.

Thanks! I'll take a look.

>> >> 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
>> >> array.


>> >> 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.
>> >
>> I'm thinking the equivalent in the python wrapper is "PartitionSize".
>> The problem is that it AND "DeviceSize" both report 2048...
> There is still a possibility there is a bug (or a missing feature) in
> udisks. Maybe have a look at udisks/udev bug tracker?


>> Right now I'm using the test program provided with python-gudev and I
>> think I'm making headway. It has a property "ID_TYPE" that is "cd" for
>> optical drives so that's one problem down. Now I just have to figure
>> out how to:
>> 1. Get the drive capacity.
>> 2. Get the media state.
>> 3. Detect and properly handle media changes.
> Good luck finding what you are looking for,



More information about the devel mailing list