[patch] physical device detection for scsi devices

Sjoerd Simons sjoerd at luon.net
Thu Jul 15 13:44:55 PDT 2004


On Thu, Jul 15, 2004 at 10:13:09PM +0200, Sjoerd Simons wrote:
> Hi,
>   
>   It seems there was some code missing for the detection of the physical
>   device for scsi devices. Attached patch fixes this. Causing the new
>   gnome-vfs patch to work properly on my workstation :) 

  And ofcourse it broke usb and ieee1394 :(. This is because it the traversal 
  first encounters a virtual scsi device. New patch attached which keeps
  traversing the the tree after detecting a scsi device, so it can find the
  real device if there is one.

  Sjoerd
-- 
Life can be so tragic -- you're here today and here tomorrow.
-------------- next part --------------
Index: hald/linux/block_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/block_class_device.c,v
retrieving revision 1.39
diff -u -r1.39 block_class_device.c
--- hald/linux/block_class_device.c	8 Jul 2004 17:12:05 -0000	1.39
+++ hald/linux/block_class_device.c	15 Jul 2004 20:37:16 -0000
@@ -1109,6 +1109,10 @@
 
 			if (strcmp (bus, "scsi_device") == 0) {
 				scsidev = d_it;
+				physdev = d_it;
+				physdev_udi = udi_it;
+				hal_device_property_set_string (
+					stordev, "storage.bus", "scsi");
 			}
 
 			if (strcmp (bus, "usb") == 0) {
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list