diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2014-08-30 01:08:34 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2014-08-30 01:29:18 -0400 |
commit | da4938d6eed9c1c29e389e9a1de6a599d365fe09 (patch) | |
tree | 31d34d70b83583f91626e23fb83dbba4eb094284 | |
parent | f3d60aea34de60c4371c04fa1b8482ca71a64b53 (diff) | |
download | rockbox-da4938d.tar.gz rockbox-da4938d.zip |
Get the last errors I hope!
Change-Id: Ia285b95480cc9ac6494b745d80892c4b1b912341
-rw-r--r-- | firmware/target/hosted/samsungypr/ypr0/system-ypr0.c | 14 | ||||
-rw-r--r-- | lib/rbcodec/rbcodecplatform-unix.h | 8 | ||||
-rw-r--r-- | lib/rbcodec/test/SOURCES | 2 | ||||
-rw-r--r-- | lib/rbcodec/test/file.h | 4 | ||||
-rw-r--r-- | lib/rbcodec/test/warble.c | 7 | ||||
-rw-r--r-- | uisimulator/common/sim_tasks.c | 22 |
6 files changed, 48 insertions, 9 deletions
diff --git a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c index a21c82b1f2..9cc307073b 100644 --- a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c +++ b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c @@ -94,6 +94,20 @@ bool hostfs_present(IF_MD_NONVOID(int drive)) return true; /* internal: always present */ } +#ifdef HAVE_MULTIDRIVE +int volume_drive(int drive) +{ + return drive; +} +#endif /* HAVE_MULTIDRIVE */ + +#ifdef CONFIG_STORAGE_MULTI +int hostfs_driver_type(int drive) +{ + return drive > 0 ? STORAGE_SD_NUM : STORAGE_HOSTFS_NUM; +} +#endif /* CONFIG_STORAGE_MULTI */ + #ifdef HAVE_HOTSWAP bool volume_removable(int volume) { diff --git a/lib/rbcodec/rbcodecplatform-unix.h b/lib/rbcodec/rbcodecplatform-unix.h index 5e65be3ae4..4ed25f44e8 100644 --- a/lib/rbcodec/rbcodecplatform-unix.h +++ b/lib/rbcodec/rbcodecplatform-unix.h @@ -50,15 +50,7 @@ #endif /* filesize */ -#include <sys/stat.h> off_t filesize(int fd); -/* -static inline off_t filesize(int fd) { - struct stat st; - fstat(fd, &st); - return st.st_size; -} -*/ /* snprintf */ #include <stdio.h> diff --git a/lib/rbcodec/test/SOURCES b/lib/rbcodec/test/SOURCES index d1413c758a..7afee84ae6 100644 --- a/lib/rbcodec/test/SOURCES +++ b/lib/rbcodec/test/SOURCES @@ -2,4 +2,4 @@ warble.c ../../../firmware/common/strlcpy.c ../../../firmware/common/unicode.c ../../../firmware/common/structec.c -../../../uisimulator/common/io.c +../../../firmware/common/pathfuncs.c diff --git a/lib/rbcodec/test/file.h b/lib/rbcodec/test/file.h new file mode 100644 index 0000000000..b673fa8f93 --- /dev/null +++ b/lib/rbcodec/test/file.h @@ -0,0 +1,4 @@ +#undef MAX_PATH +#define MAX_PATH 260 +#include <unistd.h> +#include <fcntl.h> diff --git a/lib/rbcodec/test/warble.c b/lib/rbcodec/test/warble.c index 6c8442ae26..8f11b9b56e 100644 --- a/lib/rbcodec/test/warble.c +++ b/lib/rbcodec/test/warble.c @@ -77,6 +77,13 @@ int find_first_set_bit(uint32_t value) return __builtin_ctz(value); } +off_t filesize(int fd) +{ + struct stat st; + fstat(fd, &st); + return st.st_size; +} + /***************** INTERNAL *****************/ static enum { MODE_PLAY, MODE_WRITE } mode; 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) } #endif +#ifdef CONFIG_STORAGE_MULTI +int hostfs_driver_type(int drive) +{ + /* Hack alert */ +#if (CONFIG_STORAGE & STORAGE_ATA) + #define SIMEXT1_TYPE_NUM STORAGE_ATA_NUM +#elif (CONFIG_STORAGE & STORAGE_SD) + #define SIMEXT1_TYPE_NUM STORAGE_SD_NUM +#elif (CONFIG_STORAGE & STORAGE_MMC) + #define SIMEXT1_TYPE_NUM STORAGE_MMC_NUM +#elif (CONFIG_STORAGE & STORAGE_NAND) + #define SIMEXT1_TYPE_NUM STORAGE_NAND_NUM +#elif (CONFIG_STORAGE & STORAGE_RAMDISK) + #define SIMEXT1_TYPE_NUM STORAGE_RAMDISK_NUM +#else +#error Unknown storage driver +#endif /* CONFIG_STORAGE */ + + return drive > 0 ? SIMEXT1_TYPE_NUM : STORAGE_HOSTFS_NUM; +} +#endif /* CONFIG_STORAGE_MULTI */ + #endif /* CONFIG_STORAGE & STORAGE_MMC */ |