]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/cmd_scsi.c
scsi: Add function and env var to report number of scsi drives
[people/ms/u-boot.git] / common / cmd_scsi.c
index 31ea78845ceb5ac8e42f4e1d723d4550187f35d9..9bd8ec9ecb967b7d1516f3114112f532430b6547 100644 (file)
@@ -184,6 +184,14 @@ removable:
                scsi_curr_dev=0;
        else
                scsi_curr_dev = -1;
+
+       printf("Found %d device(s).\n", scsi_max_devs);
+       setenv_ulong("scsidevs", scsi_max_devs);
+}
+
+int scsi_get_disk_count(void)
+{
+       return scsi_max_devs;
 }
 
 #ifdef CONFIG_PCI