summaryrefslogtreecommitdiff
path: root/firmware/include/dir.h
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-03-21 18:27:23 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-03-23 01:03:33 -0400
commitfdc3668a6a4d85fa6dde890ced7e9b850233bc0d (patch)
tree5b686359a60acaf753a66f2d09078607b9b11b45 /firmware/include/dir.h
parentae01ea7fd93d4ed3e1a97f9c9b25ca072ebbc431 (diff)
downloadrockbox-fdc3668a6a4d85fa6dde890ced7e9b850233bc0d.tar.gz
rockbox-fdc3668a6a4d85fa6dde890ced7e9b850233bc0d.zip
[BugFix] Multiboot Database duplicate files
When the sd card is mounted into the root namespace the database picks up files through both paths previously we hid the mounted drive but this causes issues with users databases when the drive letter changes Adds a way to keep track of volumes mounted in the root namespace Hides the enumerated volume in root Database: we can just parse the root directory ('/') and get to any mounted volume but we can also enumerate a volume in the root directory when this occurs it leads to multiple entries since the files can be reached through multiple paths ex, /Foo could also be /SD1/Foo Instead we will attempt to rewrite the root with any non-hidden volumes failing that just leave the paths alone Change-Id: I7bdba8cfaf63902d2a3852d28484bcf8ca317ebd
Diffstat (limited to 'firmware/include/dir.h')
-rw-r--r--firmware/include/dir.h6
1 files changed, 6 insertions, 0 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_ */