More on hotplug issue w/HAL

David Zeuthen david at fubar.dk
Tue Jan 6 11:27:51 EET 2004


On Mon, 2004-01-05 at 19:06, Matthew Mastracci wrote:
> (parsed from /path/to/device/host:channel:id:lun in sysfs)
> scsi_device.host = n
> scsi_device.channel = n
> scsi_device.id = n
> scsi_device.lun = n
> 
> scsi_host should have:
> 
> (parsed from the /path/to/device/hostn path in sysfs)
> scsi_host.host = n
> 
> These will uniquely identify all scsi_host and scsi_device nodes within 
> a single device.  They can then be appended to the appropriate UDI for a 
> scsi_host/scsi_device node.
> 

This makes sense, I'll add this tonight unless you already have a patch
for it?

> > on hotpluggin - the debug means that hald has received a dbus signal
> > from the udev service associating a device file with a sysfs path. You
> > might want to check that the file 
> > 
> >  /etc/dbus-1/system.d/udev_sysbus_policy.conf
> > 
> > exist on your system. It seems to be missing from an RPM I built from
> > udev-012, but that may be my own fault.
> 
> That file is missing from my system.  I used "make install" + 
> checkinstall to install HAL/dbus/udev.  I was getting a dbus permissions 
> error on connection when starting udev earlier.  After moving that file 
> to system.d, it looks like everything is working great!
> 

Ok, this needs to be fixed in udev.

> > I'm currently working on this using polling and ioctl(2) on the cdrom
> > device file (like magicdev). Unfortunately I won't have time to hack on
> > this before tomorrow evening due to other commitments in real life. If
> > you write code to detect media change for your devices, we should
> > definitely put it in HAL.
> > 
> > (btw, some day we want to use the dbus events that Rob Love's kernel
> > will be generating instead of polling)
> 
> I'm going to try sniffing the USB data stream to see if I get any sort 
> of notification that the device media has changed.  If not, I'll 
> probably have to use your polling code to perform the same tests to 
> detect it.  I'll keep you posted on what I discover.
> 

Thanks - polling using ioctl (if possible) sounds more portable than
sniffing the USB stream. Dunno..

Cheers,
David



More information about the xdg mailing list