mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Get the last errors I hope!
Change-Id: Ia285b95480cc9ac6494b745d80892c4b1b912341
This commit is contained in:
parent
f3d60aea34
commit
da4938d6ee
6 changed files with 48 additions and 9 deletions
|
@ -94,6 +94,20 @@ bool hostfs_present(IF_MD_NONVOID(int drive))
|
||||||
return true; /* internal: always present */
|
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
|
#ifdef HAVE_HOTSWAP
|
||||||
bool volume_removable(int volume)
|
bool volume_removable(int volume)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,15 +50,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* filesize */
|
/* filesize */
|
||||||
#include <sys/stat.h>
|
|
||||||
off_t filesize(int fd);
|
off_t filesize(int fd);
|
||||||
/*
|
|
||||||
static inline off_t filesize(int fd) {
|
|
||||||
struct stat st;
|
|
||||||
fstat(fd, &st);
|
|
||||||
return st.st_size;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* snprintf */
|
/* snprintf */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -2,4 +2,4 @@ warble.c
|
||||||
../../../firmware/common/strlcpy.c
|
../../../firmware/common/strlcpy.c
|
||||||
../../../firmware/common/unicode.c
|
../../../firmware/common/unicode.c
|
||||||
../../../firmware/common/structec.c
|
../../../firmware/common/structec.c
|
||||||
../../../uisimulator/common/io.c
|
../../../firmware/common/pathfuncs.c
|
||||||
|
|
4
lib/rbcodec/test/file.h
Normal file
4
lib/rbcodec/test/file.h
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#undef MAX_PATH
|
||||||
|
#define MAX_PATH 260
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
|
@ -77,6 +77,13 @@ int find_first_set_bit(uint32_t value)
|
||||||
return __builtin_ctz(value);
|
return __builtin_ctz(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
off_t filesize(int fd)
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
fstat(fd, &st);
|
||||||
|
return st.st_size;
|
||||||
|
}
|
||||||
|
|
||||||
/***************** INTERNAL *****************/
|
/***************** INTERNAL *****************/
|
||||||
|
|
||||||
static enum { MODE_PLAY, MODE_WRITE } mode;
|
static enum { MODE_PLAY, MODE_WRITE } mode;
|
||||||
|
|
|
@ -234,4 +234,26 @@ bool mmc_touched(void)
|
||||||
}
|
}
|
||||||
#endif
|
#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 */
|
#endif /* CONFIG_STORAGE & STORAGE_MMC */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue