persistent property store - first try
David Zeuthen
david at fubar.dk
Sat Jun 12 14:37:09 PDT 2004
On Sat, 2004-06-12 at 22:24, Kay Sievers wrote:
> On Sat, 2004-06-12 at 22:12 +0200, David Zeuthen wrote:
> > 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?
>
I suppose we'd have to modify the internal HalDevice API to take an
additional argument, namely the user. For all uses except in
hald_dbus.c:device_get_property() (and set_property) it will be set to
NULL. Only if the PER_USER attribute is set for the property we use this
knowledge to write to either the homedir or the system dir.
Yikes, I just checked and D-BUS doesn't export who the remote user is..
Hmm; I wonder if we can get this into D-BUS; maybe just the process id
of the remote application then we can do a number of things.
> > which isn't the same on reboot. Here's a possible solution:
> >
> > usb_5dc_2_1_-1_noserial
> > usb_5dc_2_1_-1_noserial_0
> > usb_5dc_2_1_-1_noserial_0_scsi_host
> > (e.g. parent+"scsi_host")
> > usb_5dc_2_1_-1_noserial_0_scsi_host_scsi_device_0
> > (e.g. parent+"scsi_device_<lun_number>")
> > usb_5dc_2_1_-1_noserial_0_scsi_host_scsi_device_0_block_top
> > (e.g. parent+"block_top")
> > usb_5dc_2_1_-1_noserial_0_scsi_host_scsi_device_0_block_part1
> > (e.g. parent+"block_part<partition_number>")
>
> Fine, using the whole chain for the udi is much better than the major/
> minor thing.
> 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?
>
I'm not sure they got serial numbers, no. In fact I think the existing
properties (such as vendor, model) change dependent on the connection
type, but I'm not sure as I yet have to get my external HDD enclosure to
work with Firewire on Linux 2.6; it works great with USB2 though. It
also works great with Firewire on both WinXP and Mac OS X.
> 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 :)
>
Yeah, but this might be dangerous, my Canon camera labels my CF cards as
CANON_DC when formatting it and I got two of them :-)
Cheers,
David
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list