formatting/partitioning methods in HAL

Phillip Susi psusi at cfl.rr.com
Sun Jan 15 09:27:17 PST 2006


Well, ok... but the script is running and hal-set-property is spitting 
out that error message. 

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)
>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.
>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?
>
>Chris
>_______________________________________________
>  
>

-------------- next part --------------
#!/bin/bash
set -e
DEVNUM=`pktsetup $HAL_PROP_BLOCK_DEVICE | cut -d ':' -f 2`
DEVNAME=/dev/pktcdvd/pktcdvd$DEVNUM
echo hal-set-property --udi $HAL_PROP_INFO_UDI --key block.device.pktcdvdnum --int $DEVNUM 
echo hal-set-property --udi $HAL_PROP_INFO_UDI --key block.device.pktcdvd --strlist $DEVNAME
sleep 2 ; hal-set-property --udi $HAL_PROP_INFO_UDI --key block.device.pktcdvdnum --int $DEVNUM ; hal-set-property --udi $HAL_PROP_INFO_UDI --key block.device.pktcdvd --strlist $DEVNAME




-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15-storage-pktcdvd.fdi
Type: text/xml
Size: 340 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20060115/4909bfee/15-storage-pktcdvd.xml


More information about the hal mailing list