FS#7598 - Dircache support for multivolume targets (by Phil Light).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16632 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2008-03-11 19:39:26 +00:00
parent afde7f74d4
commit 52d827a26d
6 changed files with 102 additions and 49 deletions

View file

@ -22,6 +22,23 @@
#include "config.h"
#ifdef HAVE_MULTIVOLUME
/* how to name volumes, first char must be outside of legal file names,
a number gets appended to enumerate, if applicable */
#ifdef HAVE_MMC
#define VOL_NAMES "<MMC%d>"
#define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */
#elif defined(HAVE_HOTSWAP)
#define VOL_NAMES "<microSD%d>"
#define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */
#else
#define VOL_NAMES "<HD%d>"
#define VOL_ENUM_POS 3
#endif
#endif
#ifdef HAVE_DIRCACHE
# include "dircache.h"
# define DIR DIR_CACHED

View file

@ -75,6 +75,10 @@ typedef struct {
char *get_volume_name(int volume);
#endif
#ifdef HAVE_MULTIVOLUME
int strip_volume(const char*, char*);
#endif
#ifndef DIRFUNCTIONS_DEFINED
extern DIR_UNCACHED* opendir_uncached(const char* name);