Hal 0.5.8.1 - hal-storage-mount - problems

Francesco VIRLINZI francesco.virlinzi at st.com
Wed Dec 20 05:35:17 PST 2006


I added to hal (0.5.8.1) with a simple rule:

  <device>
    <match key="block.is_volume" bool="true">
      <match key="volume.fsusage" string="filesystem">
          <append key="info.callouts.add" 
type="strlist">hal-storage-mount</append>
          <append key="info.callouts.remove" 
type="strlist">hal-storage-unmount</append>
          <merge key="volume.policy.should_mount" type="bool">true</merge>
      </match>
    </match>
</device>


to mount every volume but the hal-storage-mount shows some problems with

        if (strlen (fgets (mount_point, sizeof (mount_point), stdin)) > 0)
                mount_point   [strlen (mount_point)   - 1] = '\0';

because the fgets returns a NULL pointer .

I'm fixing with
+       ch_fix = fgets (mount_point, sizeof (mount_point), stdin);
+       if (ch_fix)
+               mount_point   [strlen (mount_point)   - 1] = '\0';
+       else
+               *mount_point = '\0';

Has any body the some problem or my HAL is broken?

I'm useing dbus 1.0.2 and I have no 'dbus-session'
Regard
 Francesco V.


More information about the hal mailing list