how to tell hald to reread .fdi files without restarting hald ?

David Zeuthen david at fubar.dk
Thu Jan 20 18:49:19 PST 2005


On Fri, 2005-01-21 at 04:30 +0200, Paul Ionescu wrote:
> Well, I thought we are supposed get updated .fdi files from the internet.
> After I installed a new device which is not in local .fdi, we may get
> from the net a .fdi for it.
> 

Certainly - that's part of The Grand Plan(tm). Now, we can do this with
Reprobe(); it will look like this

 USB device
  USB Mass Storage Interface
   SCSI Host
    SCSI Device
     Drive (/dev/sda)       (*)
      Partition (/dev/sda1)

for a simple card reader. User inserts this a get a grey drive icon;
now some UI gizmo says "Hey, wanna search the net for a .fdi file" and
the user clicks "Search". We find a .fdi file and install it and
invoke Reprobe() on the USB device. Now this entire subtree goes
away and is added again. The difference now is that the icon is a
flashy Compact Flash icon instead.

Why does it have to that difficult? Well, we *could* just say
ReloadDeviceFile() and then the Drive (marked with *) would
flip the storage.drive_type property from "disk" to "compact_flash".

But then for the UI to work you would need gnome-vfs or other
UI parts to be able to handle subtle changes. I don't think that
is fair to assume. 

It get's more interesting if the .fdi file you load from the
Internet says "use another driver" or something similar. Use
cases like that.

The interesting thing is that it's probably much simpler to
implement Reprobe() than ReloadDeviceFile() - it's just
simulating a bunch of hotplug events.

David


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list