persistent property store - first try
kay.sievers at vrfy.org
Sat Jun 12 13:24:56 PDT 2004
On Sat, 2004-06-12 at 22:12 +0200, David Zeuthen wrote:
> On Sat, 2004-06-12 at 21:33, Kay Sievers wrote:
> > > 3. All buses are probed and presently rename_and_merge() from common.c
> > > is called for devices we add. Here we should check if the UDI is
> > > already in the LDL, if it is then copy the device from the LDL.
> > Nice idea to read the whole store in a new device_list. I thought we
> > call it for every device found, but this way we can use the merge logic.
> > We probably need a:
> > 'HalDeviceStore *hal_pstore_load_store (HalPStore *pstore)' in pstore.c?
> Yeah, that would make sense. Perhaps even putting the functionality of
> HalPStore into HalDeviceStore and make the constructor accept NULL if we
> don't need to write to disk (like for the temporary device store).
Hmm, if the store belongs to a particular list, how can a property be
written to the users home and another one to the systems store?
> > > a. We need to ensure that the UDI's are really as unique as can be.
> > > Presently this is the case for USB devices but we need to apply some
> > > minor tweaks to scsi, ide and block UDI computation. Should be
> > > rather trivial; we can always use the UDI of the parent and use
> > > some numbering scheme to ensure this.
> > Hmm, the current major/minor udi's for block devices is not stable
> > enough across reboot, right?
> No, they're not, they may even be completely random at some point :-).
> Today, the tree for my CF Card Reader looks like this:
> which isn't the same on reboot. Here's a possible solution:
> (e.g. parent+"scsi_host")
> (e.g. parent+"scsi_device_<lun_number>")
> (e.g. parent+"block_top")
> (e.g. parent+"block_part<partition_number>")
Fine, using the whole chain for the udi is much better than the major/
But it would be really nice if a external drive with both, a USB and
FireWire connector is can be recognized as the same thing regardless of
the bus used. All hard disks have serial numbers, can't we use these?
And if we find a label on a partition, we can use it and you can insert
your CF card in a different reader too :)
hal mailing list
hal at freedesktop.org
More information about the Hal