View | Details | Raw Unified | Return to bug 141228
Collapse All | Expand All

(-)ChangeLog (+5 lines)
Lines 1-3 Link Here
1
2006-01-20  Kay Sievers  <kay.sievers@vrfy.org>
2
3
	* hald/linux2/physdev.c: (scsi_add): Add scsi.type, scsi.vendor,
4
	scsi.model for the scsi device.
5
1
2006-01-18  David Zeuthen  <david@fubar.dk>
6
2006-01-18  David Zeuthen  <david@fubar.dk>
2
7
3
	* hald/linux2/addons/addon-pmu.c (main): Use a direct connection to
8
	* hald/linux2/addons/addon-pmu.c (main): Use a direct connection to
(-)hald/device_info.c (-3 / +1 lines)
Lines 190-196 Link Here
190
		goto out;
190
		goto out;
191
	}
191
	}
192
192
193
	
194
	/* Start with the source udi */
193
	/* Start with the source udi */
195
	strncpy (udi_result, source_udi, udi_result_size);
194
	strncpy (udi_result, source_udi, udi_result_size);
196
195
Lines 232-238 Link Here
232
			strncpy (udi_result, newudi, udi_result_size);
231
			strncpy (udi_result, newudi, udi_result_size);
233
		} else {
232
		} else {
234
			/*HAL_INFO (("new_udi = '%s'", curtoken));*/
233
			/*HAL_INFO (("new_udi = '%s'", curtoken));*/
235
			strncpy (udi_result, curtoken, udi_result_size);			
234
			strncpy (udi_result, curtoken, udi_result_size);
236
		}
235
		}
237
236
238
	}
237
	}
Lines 528-534 Link Here
528
527
529
		/*HAL_INFO (("is_absolute=%d, should_be=%d, path='%s'", is_absolute_path, should_be_absolute_path, path));*/
528
		/*HAL_INFO (("is_absolute=%d, should_be=%d, path='%s'", is_absolute_path, should_be_absolute_path, path));*/
530
529
531
532
		if (should_be_absolute_path) {
530
		if (should_be_absolute_path) {
533
			if (is_absolute_path)
531
			if (is_absolute_path)
534
				return TRUE;
532
				return TRUE;
(-)hald/linux2/physdev.c (-1 / +28 lines)
Lines 681-686 Link Here
681
	HalDevice *d;
681
	HalDevice *d;
682
	const gchar *bus_id;
682
	const gchar *bus_id;
683
	gint host_num, bus_num, target_num, lun_num;
683
	gint host_num, bus_num, target_num, lun_num;
684
	int type;
684
685
685
	if (parent == NULL) {
686
	if (parent == NULL) {
686
		d = NULL;
687
		d = NULL;
Lines 702-710 Link Here
702
703
703
	hal_util_set_driver (d, "info.linux.driver", sysfs_path);
704
	hal_util_set_driver (d, "info.linux.driver", sysfs_path);
704
705
705
	/* guestimate product name */
706
	hal_device_property_set_string (d, "info.product", "SCSI Device");
706
	hal_device_property_set_string (d, "info.product", "SCSI Device");
707
707
708
	hal_util_set_string_from_file (d, "scsi.model", sysfs_path, "model");
709
	hal_util_set_string_from_file (d, "scsi.vendor", sysfs_path, "vendor");
710
	hal_util_get_int_from_file (sysfs_path, "type", &type, 0);
711
	switch (type) {
712
	case 0:
713
		/* Disk */
714
	case 14:
715
		/* TYPE_RBC (Reduced Block Commands)
716
		 * Simple Direct Access Device, set it to disk
717
		 * (some Firewire Disks use it)
718
		 */
719
		hal_device_property_set_string (d, "scsi.type", "disk");
720
		break;
721
	case 1:
722
		/* Tape */
723
		hal_device_property_set_string (d, "scsi.type", "tape");
724
		break;
725
	case 4:
726
		/* WORM */
727
	case 5:
728
		/* CD-ROM */
729
		hal_device_property_set_string (d, "scsi.type", "cdrom");
730
		break;
731
	default:
732
		hal_device_property_set_string (d, "scsi.type", "unknown");
733
	}
734
708
out:
735
out:
709
	return d;
736
	return d;
710
}
737
}

Return to bug 141228