The purpose of the hald-addon-* files.

David Zeuthen david at fubar.dk
Tue May 2 08:40:21 PDT 2006


On Tue, 2006-05-02 at 16:26 +0100, Aaron Newell wrote:
> However, all hardware events are already sent to HAL via this udev rule:
> 
> RUN+="socket:/org/freedesktop/hal/udev_event"
> 
> So I still can't see the point in the hald-addon-* files. I'm
> obviously missing something. Care to explain?

The point is that the underlying software (on Linux 2.6 based systems
it's the Linux kernel + udev) simply doesn't give you events for e.g.
media removal unless something in user space is periodically polling the
device file. That's just the way the Linux kernel works.

But wait.. add-on's are more than that: For example.. UPS'es connected
through USB using the USB standard HID protocol, HAL listens for events
directly from the device (ok, so it's channeled through the kernel but
the kernel has little or no idea it's a UPS - the kernel only knows it's
a USB Human Interface Device).

So, add-on's serve at least two purposes

 1. To poll device files so the kernel notices changes

 2. To act as user-space drives extracting the information we need

The whole point of HAL is that application programmers will not have to
care about all these annoying implementation details; the hal spec
guarantees certain things to make life easier for desktop developers.

Hope this clarifies.

    David




More information about the hal mailing list