[Utopia] Support for persistent keys

Kay Sievers kay.sievers at vrfy.org
Thu Oct 21 05:57:33 PDT 2004


On Thu, 2004-10-21 at 13:53 +0200, Martin Pitt wrote:

[I've moved from UTOPIA to the HAL list]

> I'm currently thinking about improving device label handling in
> Ubuntu. Hal already supports reading out device labels, but this has
> some drawbacks:
> 
>  * users are not allowed to change device labels on raw devices (at
>    least not without becoming root)

I will add write support to volume_id in the not to far future. We will
be able to change the volume with hald. I expect an interface in libhal-
storage for that.

>  * at least some file system limit the size of the label (IIRC VFAT
>    allows max. 11 characters)

Yes, it is 8+3 for FAT, but I personally don't think, that we should
allow to map something fancy here, cause no other OS will do that and it
is nice to have the same name everywhere (especially for usb sticks).
For the same reason I think we should change the label on the volume and
not map it magically.

> So I think it might be a working idea to maintain a mapping device
> UUID -> device label persistently on a computer. Since hal already is
> a nice database for such purposes, I would like to see persistent keys
> in hal. 

It's already in there. HAL is able to store properties on disk, if you
set an attribute on the property. Look in pstore.c.

> The keys and values could be stored in synthesized fdi files below e.
> g. /var/lib/hal; as soon as a persistent key is written, it is stored
> as an fdi file. When hal is started (or a new device appears) it would
> read in these additional fdis and everything should work.
> 
> Of course persistent keys must somehow be marked as such. One
> possibility would be to prefix their name with "persistent.", but
> maybe somebody has a better idea.

It should already be possible to maintain a fdi file which sets
storage.policy.* with names for specific volumes.
Look in storage-policy.fdi.

Kay

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list