diff options
-rw-r--r-- | firmware/SOURCES | 1 | ||||
-rw-r--r-- | firmware/common/dir_uncached.c | 30 | ||||
-rw-r--r-- | firmware/common/dircache.c | 3 | ||||
-rw-r--r-- | firmware/common/file.c | 1 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c | 2 |
5 files changed, 6 insertions, 31 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES index 5221d3fb8d..baba51ca20 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -41,6 +41,7 @@ common/errno.c | |||
41 | #endif /* !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__) */ | 41 | #endif /* !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__) */ |
42 | common/memcmp.c | 42 | common/memcmp.c |
43 | common/memchr.c | 43 | common/memchr.c |
44 | common/misc.c | ||
44 | common/qsort.c | 45 | common/qsort.c |
45 | common/random.c | 46 | common/random.c |
46 | common/sprintf.c | 47 | common/sprintf.c |
diff --git a/firmware/common/dir_uncached.c b/firmware/common/dir_uncached.c index dd157f0ade..ef9ce6f0af 100644 --- a/firmware/common/dir_uncached.c +++ b/firmware/common/dir_uncached.c | |||
@@ -35,36 +35,6 @@ | |||
35 | 35 | ||
36 | static DIR_UNCACHED opendirs[MAX_OPEN_DIRS]; | 36 | static DIR_UNCACHED opendirs[MAX_OPEN_DIRS]; |
37 | 37 | ||
38 | #ifdef HAVE_MULTIVOLUME | ||
39 | |||
40 | /* returns on which volume this is, and copies the reduced name | ||
41 | (sortof a preprocessor for volume-decorated pathnames) */ | ||
42 | int strip_volume(const char* name, char* namecopy) | ||
43 | { | ||
44 | int volume = 0; | ||
45 | const char *temp = name; | ||
46 | |||
47 | while (*temp == '/') /* skip all leading slashes */ | ||
48 | ++temp; | ||
49 | |||
50 | if (*temp && !strncmp(temp, VOL_NAMES, VOL_ENUM_POS)) | ||
51 | { | ||
52 | temp += VOL_ENUM_POS; /* behind special name */ | ||
53 | volume = atoi(temp); /* number is following */ | ||
54 | temp = strchr(temp, '/'); /* search for slash behind */ | ||
55 | if (temp != NULL) | ||
56 | name = temp; /* use the part behind the volume */ | ||
57 | else | ||
58 | name = "/"; /* else this must be the root dir */ | ||
59 | } | ||
60 | |||
61 | strlcpy(namecopy, name, MAX_PATH); | ||
62 | |||
63 | return volume; | ||
64 | } | ||
65 | #endif /* #ifdef HAVE_MULTIVOLUME */ | ||
66 | |||
67 | |||
68 | #ifdef HAVE_HOTSWAP | 38 | #ifdef HAVE_HOTSWAP |
69 | // release all dir handles on a given volume "by force", to avoid leaks | 39 | // release all dir handles on a given volume "by force", to avoid leaks |
70 | int release_dirs(int volume) | 40 | int release_dirs(int volume) |
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index e846d55452..f844e548f6 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c | |||
@@ -182,6 +182,9 @@ static bool check_event_queue(void) | |||
182 | static int dircache_scan(IF_MV2(int volume,) struct travel_data *td) | 182 | static int dircache_scan(IF_MV2(int volume,) struct travel_data *td) |
183 | { | 183 | { |
184 | #ifdef SIMULATOR | 184 | #ifdef SIMULATOR |
185 | #ifdef HAVE_MULTIVOLUME | ||
186 | (void)volume; | ||
187 | #endif | ||
185 | while ( ( td->entry = readdir_uncached(td->dir) ) ) | 188 | while ( ( td->entry = readdir_uncached(td->dir) ) ) |
186 | #else | 189 | #else |
187 | while ( (fat_getnext(td->dir, &td->entry) >= 0) && (td->entry.name[0])) | 190 | while ( (fat_getnext(td->dir, &td->entry) >= 0) && (td->entry.name[0])) |
diff --git a/firmware/common/file.c b/firmware/common/file.c index 770930d80a..b7bcbaba46 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c | |||
@@ -795,4 +795,3 @@ int release_files(int volume) | |||
795 | return closed; /* return how many we did */ | 795 | return closed; /* return how many we did */ |
796 | } | 796 | } |
797 | #endif /* #ifdef HAVE_HOTSWAP */ | 797 | #endif /* #ifdef HAVE_HOTSWAP */ |
798 | |||
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c index 454d7a51f2..d4877a9968 100644 --- a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c | |||
@@ -37,7 +37,9 @@ | |||
37 | #include "usb.h" | 37 | #include "usb.h" |
38 | 38 | ||
39 | static long last_disk_activity = -1; | 39 | static long last_disk_activity = -1; |
40 | #ifdef CONFIG_STORAGE_MULTI | ||
40 | static int sd_drive_nr = 0; | 41 | static int sd_drive_nr = 0; |
42 | #endif | ||
41 | static tCardInfo card; | 43 | static tCardInfo card; |
42 | 44 | ||
43 | static long sd_stack[(DEFAULT_STACK_SIZE*2 + 0x1c0)/sizeof(long)]; | 45 | static long sd_stack[(DEFAULT_STACK_SIZE*2 + 0x1c0)/sizeof(long)]; |