summaryrefslogtreecommitdiffstats
path: root/firmware/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/storage.c')
-rw-r--r--firmware/storage.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/storage.c b/firmware/storage.c
index 8740e4ebd2..7ef7428854 100644
--- a/firmware/storage.c
+++ b/firmware/storage.c
@@ -190,6 +190,15 @@ int storage_num_drives(void)
return num_drives;
}
+int storage_driver_type(int drive)
+{
+ if (drive >= num_drives)
+ return -1;
+
+ unsigned int bit = (storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET;
+ return bit ? find_first_set_bit(bit) : -1;
+}
+
int storage_init(void)
{
int rc=0;