diff options
Diffstat (limited to 'firmware/common/dir_uncached.c')
-rw-r--r-- | firmware/common/dir_uncached.c | 30 |
1 files changed, 0 insertions, 30 deletions
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) |