Bugzilla – Attachment 62018 Details for
Bug 141228
scsi generic devices needed in hal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
export scsi_generic devices
hal-scsi_generic-01.patch (text/plain), 2.87 KB, created by
Kay Sievers
on 2006-01-05 04:20:46 UTC
(
hide
)
Description:
export scsi_generic devices
Filename:
MIME Type:
Creator:
Kay Sievers
Created:
2006-01-05 04:20:46 UTC
Size:
2.87 KB
patch
obsolete
>Index: ChangeLog >=================================================================== >RCS file: /cvs/hal/hal/ChangeLog,v >retrieving revision 1.720 >diff -u -r1.720 ChangeLog >--- ChangeLog 21 Dec 2005 16:07:40 -0000 1.720 >+++ ChangeLog 5 Jan 2006 04:17:20 -0000 >@@ -1,3 +1,10 @@ >+2006-01-05 Kay Sievers <kay.sievers@vrfy.org> >+ >+ Add scsi_generic devices. >+ >+ * hald/linux2/classdev.c: (scsi_generic_add), >+ (scsi_generic_compute_udi): >+ > 2005-12-21 Kay Sievers <kay.sievers@vrfy.org> > > Move callout one level up. >Index: hald/linux2/classdev.c >=================================================================== >RCS file: /cvs/hal/hal/hald/linux2/classdev.c,v >retrieving revision 1.37 >diff -u -r1.37 classdev.c >--- hald/linux2/classdev.c 9 Dec 2005 18:08:20 -0000 1.37 >+++ hald/linux2/classdev.c 5 Jan 2006 04:17:21 -0000 >@@ -314,6 +314,43 @@ > /*--------------------------------------------------------------------------------------------------------------*/ > > static HalDevice * >+scsi_generic_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *physdev, const gchar *sysfs_path_in_devices) >+{ >+ HalDevice *d; >+ >+ d = NULL; >+ >+ if (physdev == NULL || sysfs_path_in_devices == NULL) >+ goto out; >+ >+ d = hal_device_new (); >+ hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path); >+ hal_device_property_set_string (d, "info.parent", physdev->udi); >+ hal_device_property_set_string (d, "info.category", "scsi_generic"); >+ hal_device_add_capability (d, "scsi_generic"); >+ hal_device_property_set_string (d, "info.product", "SCSI Generic Interface"); >+ hal_device_property_set_string (d, "scsi_generic.device", device_file); >+ >+out: >+ return d; >+} >+ >+static gboolean >+scsi_generic_compute_udi (HalDevice *d) >+{ >+ gchar udi[256]; >+ >+ hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi), >+ "%s_scsi_generic", >+ hal_device_property_get_string (d, "info.parent")); >+ hal_device_set_udi (d, udi); >+ hal_device_property_set_string (d, "info.udi", udi); >+ return TRUE; >+} >+ >+/*--------------------------------------------------------------------------------------------------------------*/ >+ >+static HalDevice * > scsi_host_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *physdev, const gchar *sysfs_path_in_devices) > { > HalDevice *d; >@@ -946,6 +983,16 @@ > .remove = classdev_remove > }; > >+static ClassDevHandler classdev_handler_scsi_generic = >+{ >+ .subsystem = "scsi_generic", >+ .add = scsi_generic_add, >+ .get_prober = NULL, >+ .post_probing = NULL, >+ .compute_udi = scsi_generic_compute_udi, >+ .remove = classdev_remove >+}; >+ > static ClassDevHandler classdev_handler_scsi_host = > { > .subsystem = "scsi_host", >@@ -1020,6 +1067,7 @@ > &classdev_handler_input, > &classdev_handler_bluetooth, > &classdev_handler_net, >+ &classdev_handler_scsi_generic, > &classdev_handler_scsi_host, > &classdev_handler_usbclass, > &classdev_handler_sound,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 141228
: 62018 |
64267