summaryrefslogtreecommitdiff
path: root/uisimulator/common/sim_tasks.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/common/sim_tasks.c')
-rw-r--r--uisimulator/common/sim_tasks.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/uisimulator/common/sim_tasks.c b/uisimulator/common/sim_tasks.c
index 003b993740..c2497d113b 100644
--- a/uisimulator/common/sim_tasks.c
+++ b/uisimulator/common/sim_tasks.c
@@ -234,4 +234,26 @@ bool mmc_touched(void)
234} 234}
235#endif 235#endif
236 236
237#ifdef CONFIG_STORAGE_MULTI
238int hostfs_driver_type(int drive)
239{
240 /* Hack alert */
241#if (CONFIG_STORAGE & STORAGE_ATA)
242 #define SIMEXT1_TYPE_NUM STORAGE_ATA_NUM
243#elif (CONFIG_STORAGE & STORAGE_SD)
244 #define SIMEXT1_TYPE_NUM STORAGE_SD_NUM
245#elif (CONFIG_STORAGE & STORAGE_MMC)
246 #define SIMEXT1_TYPE_NUM STORAGE_MMC_NUM
247#elif (CONFIG_STORAGE & STORAGE_NAND)
248 #define SIMEXT1_TYPE_NUM STORAGE_NAND_NUM
249#elif (CONFIG_STORAGE & STORAGE_RAMDISK)
250 #define SIMEXT1_TYPE_NUM STORAGE_RAMDISK_NUM
251#else
252#error Unknown storage driver
253#endif /* CONFIG_STORAGE */
254
255 return drive > 0 ? SIMEXT1_TYPE_NUM : STORAGE_HOSTFS_NUM;
256}
257#endif /* CONFIG_STORAGE_MULTI */
258
237#endif /* CONFIG_STORAGE & STORAGE_MMC */ 259#endif /* CONFIG_STORAGE & STORAGE_MMC */