patch-2.3.29 linux/drivers/scsi/scsi_proc.c

Next file: linux/drivers/scsi/scsicam.c
Previous file: linux/drivers/scsi/scsi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.28/linux/drivers/scsi/scsi_proc.c linux/drivers/scsi/scsi_proc.c
@@ -118,6 +118,7 @@
 void build_proc_dir_entries(Scsi_Host_Template * tpnt)
 {
 	struct Scsi_Host *hpnt;
+	char name[10];	/* see scsi_unregister_host() */
 
 	tpnt->proc_dir = create_proc_entry(tpnt->proc_name, S_IFDIR, proc_scsi);
 	tpnt->proc_dir->owner = tpnt->module;
@@ -126,7 +127,8 @@
 	while (hpnt) {
 		if (tpnt == hpnt->hostt) {
 			struct proc_dir_entry *p;
-			p = create_proc_read_entry(hpnt->proc_name,
+			sprintf(name,"%d",hpnt->host_no);
+			p = create_proc_read_entry(name,
 					S_IFREG | S_IRUGO | S_IWUSR,
 					tpnt->proc_dir,
 					proc_scsi_read,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)