formatting/partitioning methods in HAL

David Zeuthen david at fubar.dk
Sun Jan 15 14:01:35 PST 2006


On Sun, 2006-01-15 at 00:48 -0500, Christopher Santero wrote:
> I'm interested in implementing the formatting and parititioning
> methods David talks about in this Gnome bug:
> http://bugzilla.gnome.org/show_bug.cgi?id=309067
> 
> I'm new to HAL and DBUS so I'm trying to figure out what I'd need to
> do to get started with this. Using formatting as an example, so far
> I've figured out the following:
> 
> 1. In libhal-storage I have to create a method of LibHalVolume called
> libhal_volume_format (LibHalVolume *volume, const char *fs_type, const
> char *label)

Oh, this I would wait with. We don't even have this for Mount() yet so
just use the dbus_message_new_method_call directly from your program.
When we're super sure about the interface we can add the convenience
functions in libhal-storage (that's all they are - convenience).

> assuming those are the parameters we want for that. This should use
> dbus_message_new_method_call to invoke Format with an interface of
> org.freedesktop.Hal.Device.Volume.

Suggest to use org.freedesktop.Hal.Device.Volume.Unstable for the time
being (also D-BUS needs a fix to lock down methods on a finer scale than
just interfaces). 

So.. I think this is OK (and the road ahead) as we want to mark this
interface / functionality as unstable as it will definitely evolve over
time and not be fully cooked before in a few months. This way you can
also have your code in the HAL tree without annoying too many people :-)

> 2. In fdi/policy/10osvendor/20-storage-methods.fdi I match devices
> where the key info.capabilities contains "volume" and add the Format
> method in there, with a signature of ss and an execpath of
> hal-system-storage-format.
> 3. Then I create a script in tools/hal-system-storage-format which
> does actual stuff.
> 
> Does that sound correct, and am I missing anything?

Sounds about right - thanks for looking into this!

Oh, at some point we also want PartitionDisk() method on drives but that
can wait until the Format() is hashed out.

Cheers,
David




More information about the hal mailing list