formatting/partitioning methods in HAL

Phillip Susi psusi at cfl.rr.com
Sun Jan 15 09:39:10 PST 2006


Whoa, WTF?  That was NOT the message I clicked reply to.  Sorry about 
that. 

Phillip Susi wrote:

> 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
>> _______________________________________________
>>  
>>
>
>------------------------------------------------------------------------
>
>#!/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
>
>
>
>
>  
>
>------------------------------------------------------------------------
>
><?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 
>
><deviceinfo version="0.2">
>  <device>
>    <match key="storage.cdrom.cdrw" bool="true">
>      <match key="block.is_volume" bool="false">
>        <append key="info.callouts.add" type="strlist">
>	  /home/phreak/dump
>	</append>
>      </match>
>    </match>
>  </device>
></deviceinfo>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>hal mailing list
>hal at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/hal
>  
>



More information about the hal mailing list