libhal-storage
David Zeuthen
david at fubar.dk
Fri Sep 24 05:31:30 PDT 2004
Hey,
Sorry for the lag,
On Thu, 2004-09-23 at 23:31 +0200, Kay Sievers wrote:
> On Thu, 2004-09-23 at 22:08 +0200, David Zeuthen wrote:
>
> > This library serves the following two purposes
> >
> > 1. C-based API for accessing what HAL knows about storage devices
> > and volumes; e.g. you no longer need to use the somewhat fragile
> > and tedious string-based property API. Which is nice.
>
> Nice, nice, nice. I like that and it should make the use of the
> HAL storage-part much more easy and abstract. And we can more frequently
> change the internals :)
>
Not that we should change the block.*, volume.* and storage.* properties
in any incompatible way ever, but yes.
> > Another thought I had was this: Perhaps this library should expose
> > functions like hal_volume_set_label(),hal_volume_mount(),
> > hal_volume_unmount() etc. This will in many ways close the loop; e.g.
> > provide full abstraction of various storage devices and volumes in the
> > system. I like that.
>
> Ok, to the point of the label setting, we once decided not to do this
> with HAL, but it's still a nice feature. If we agree that we want that
> as a part of HAL, I'm willing to do that.
>
Oh, but I think we discussed not doing this from hal daemon which I
think makes sense - the hal daemon is only for discovery of devices. The
idea now is to do this as part libhal-storage. I definitely think there
is a need for this; I personally want to be able to rename my volumes
from e.g. Nautilus.
There's two issues in play; the API needs to be thought out; we want to
have at least
hal_volume_set_label()
hal_volume_can_set_label()
hal_volume_is_valid_label()
hal_volume_label_get_max_length()
hal_volume_get_supported_charset()
or something; just thinking out loud. There's also the inherent problem
that this requires access to the disk to actually write the label; I'm
not sure yet how to solve that.
> I'm thinking about wrapping existing commandline-tools in a simple
> function. This should work with most of the currently available tools.
> Only for FAT, I don't know if there is one, that really works.
>
> What do you think?
>
This could be one way to do it.
David
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list