persistent property store - first try

David Zeuthen david at
Sat Jun 12 11:58:23 PDT 2004

On Fri, 2004-06-11 at 17:21, Kay Sievers wrote:
> > > On Fri, 2004-06-11 at 00:06 +0200, Kay Sievers wrote:
> Here is a small update with a few more checks for NULL parameters
> and a simpler device.c integration.
> Hmm, should we convert:
>   hal_device_property_set_persistence(d, "info.test", TRUE)
> to a generic method, so we may use it for other possible attributes too?
> Something like this:
>   hal_device_property_set_attribute(d, "info.test", HAL_PROP_ATTR_CALLOUT, FALSE)
>   hal_device_property_set_attribute(d, "info.test", HAL_PROP_ATTR_PERSISTENCE, TRUE)
> Or if we have bits only:
>   hal_device_property_set_attribute(d, "info.test", HAL_PROP_ATTR_CALLOUT |)
>                                                     HAL_PROP_ATTR_PERSISTENCE)

I'd say go for the former, but that's more a personal preference. We
probably want to look at what attributes we should have other than
these. PER_USER and READONLY comes to mind. 

By default we should probably go with exactly CALLOUT, PERSISTENCE,
READONLY. And we should probably hardcode things such that any property
whose keyname starts with 'user.' is always PER_USER, !READONLY and
!CALLOUT. Per-user probably requires a bit rework on hald_dbus.c.

One comment on this patch

> +#define HAL_PSTORE_SYSTEM_PATH      "/var/lib/hal"
> +

This should probably be PACKAGE_LOCALSTATE_DIR so it works with
installing in /usr/local.

Many thanks,

hal mailing list
hal at

More information about the Hal mailing list