summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/dir.h6
-rw-r--r--firmware/include/dircache_redirect.h5
-rw-r--r--firmware/include/rb_namespace.h3
3 files changed, 12 insertions, 2 deletions
diff --git a/firmware/include/dir.h b/firmware/include/dir.h
index 2f78b11cf5..4599877ede 100644
--- a/firmware/include/dir.h
+++ b/firmware/include/dir.h
@@ -63,6 +63,9 @@
63#ifndef dir_exists 63#ifndef dir_exists
64#define dir_exists FS_PREFIX(dir_exists) 64#define dir_exists FS_PREFIX(dir_exists)
65#endif 65#endif
66#ifndef root_realpath
67#define root_realpath FS_PREFIX(root_realpath)
68#endif
66#endif /* !DIRFUNCTIONS_DEFINED */ 69#endif /* !DIRFUNCTIONS_DEFINED */
67 70
68#ifndef DIRENT_DEFINED 71#ifndef DIRENT_DEFINED
@@ -83,6 +86,9 @@ struct dirinfo
83#ifndef DIRFUNCTIONS_DECLARED 86#ifndef DIRFUNCTIONS_DECLARED
84/* TIP: set errno to zero before calling to see if anything failed */ 87/* TIP: set errno to zero before calling to see if anything failed */
85struct dirinfo dir_get_info(DIR *dirp, struct DIRENT *entry); 88struct dirinfo dir_get_info(DIR *dirp, struct DIRENT *entry);
89const char* root_realpath(void);
86#endif /* !DIRFUNCTIONS_DECLARED */ 90#endif /* !DIRFUNCTIONS_DECLARED */
87 91
92
93
88#endif /* _DIR_H_ */ 94#endif /* _DIR_H_ */
diff --git a/firmware/include/dircache_redirect.h b/firmware/include/dircache_redirect.h
index f51ce70690..36f68b7251 100644
--- a/firmware/include/dircache_redirect.h
+++ b/firmware/include/dircache_redirect.h
@@ -139,8 +139,10 @@ static inline void fileop_onsync_internal(struct filestr_base *stream)
139 139
140static inline void volume_onmount_internal(IF_MV_NONVOID(int volume)) 140static inline void volume_onmount_internal(IF_MV_NONVOID(int volume))
141{ 141{
142#if defined(HAVE_MULTIBOOT) && !defined(SIMULATOR) && !defined(BOOTLOADER) 142#if (defined(HAVE_MULTIVOLUME) || (defined(HAVE_MULTIBOOT) && !defined(BOOTLOADER)))
143 char path[VOL_MAX_LEN+2]; 143 char path[VOL_MAX_LEN+2];
144#endif
145#if defined(HAVE_MULTIBOOT) && !defined(SIMULATOR) && !defined(BOOTLOADER)
144 char rtpath[MAX_PATH / 2]; 146 char rtpath[MAX_PATH / 2];
145 make_volume_root(volume, path); 147 make_volume_root(volume, path);
146 148
@@ -183,7 +185,6 @@ standard_redirect:
183 root_mount_path(RB_ROOT_CONTENTS_DIR, NSITEM_CONTENTS); 185 root_mount_path(RB_ROOT_CONTENTS_DIR, NSITEM_CONTENTS);
184 } 186 }
185#elif defined(HAVE_MULTIVOLUME) 187#elif defined(HAVE_MULTIVOLUME)
186 char path[VOL_MAX_LEN+2];
187 make_volume_root(volume, path); 188 make_volume_root(volume, path);
188 root_mount_path(path, RB_ROOT_VOL_HIDDEN(volume) ? NSITEM_HIDDEN : 0); 189 root_mount_path(path, RB_ROOT_VOL_HIDDEN(volume) ? NSITEM_HIDDEN : 0);
189 if (volume == path_strip_volume(RB_ROOT_CONTENTS_DIR, NULL, false)) 190 if (volume == path_strip_volume(RB_ROOT_CONTENTS_DIR, NULL, false))
diff --git a/firmware/include/rb_namespace.h b/firmware/include/rb_namespace.h
index 7bc711b5a6..5cd8c2dd29 100644
--- a/firmware/include/rb_namespace.h
+++ b/firmware/include/rb_namespace.h
@@ -37,6 +37,8 @@ struct ns_scan_info
37}; 37};
38 38
39/* root functions */ 39/* root functions */
40#define ROOT_MAX_REALPATH 80
41const char* root_get_realpath(void);
40int root_mount_path(const char *path, unsigned int flags); 42int root_mount_path(const char *path, unsigned int flags);
41void root_unmount_volume(IF_MV_NONVOID(int volume)); 43void root_unmount_volume(IF_MV_NONVOID(int volume));
42int root_readdir_dirent(struct filestr_base *stream, 44int root_readdir_dirent(struct filestr_base *stream,
@@ -49,6 +51,7 @@ int ns_open_root(IF_MV(int volume,) unsigned int *callflagsp,
49 struct file_base_info *infop, uint16_t *attrp); 51 struct file_base_info *infop, uint16_t *attrp);
50int ns_open_stream(const char *path, unsigned int callflags, 52int ns_open_stream(const char *path, unsigned int callflags,
51 struct filestr_base *stream, struct ns_scan_info *scanp); 53 struct filestr_base *stream, struct ns_scan_info *scanp);
54bool ns_volume_is_visible(IF_MV_NONVOID(int volume));
52 55
53/* closes the namespace stream */ 56/* closes the namespace stream */
54static inline int ns_close_stream(struct filestr_base *stream) 57static inline int ns_close_stream(struct filestr_base *stream)