summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/dircache.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/firmware/include/dircache.h b/firmware/include/dircache.h
index 908165cf3c..585bb10fbc 100644
--- a/firmware/include/dircache.h
+++ b/firmware/include/dircache.h
@@ -47,22 +47,6 @@ struct travel_data {
47 int pathpos; 47 int pathpos;
48}; 48};
49 49
50#define MAX_PENDING_BINDINGS 2
51struct fdbind_queue {
52 char path[MAX_PATH];
53 int fd;
54};
55
56/* Exported structures. */
57struct dircache_entry {
58 struct dirinfo info;
59 struct dircache_entry *next;
60 struct dircache_entry *up;
61 struct dircache_entry *down;
62 long startcluster;
63 char *d_name;
64};
65
66struct dirent_cached { 50struct dirent_cached {
67 struct dirinfo info; 51 struct dirinfo info;
68 char *d_name; 52 char *d_name;
@@ -72,7 +56,7 @@ struct dirent_cached {
72typedef struct { 56typedef struct {
73 bool busy; 57 bool busy;
74 struct dirent_cached theent; /* .attribute is set to -1 on init(opendir) */ 58 struct dirent_cached theent; /* .attribute is set to -1 on init(opendir) */
75 struct dircache_entry *internal_entry; /* the current entry in the directory */ 59 int internal_entry; /* the current entry in the directory */
76 DIR_UNCACHED *regulardir; 60 DIR_UNCACHED *regulardir;
77} DIR_CACHED; 61} DIR_CACHED;
78 62
@@ -90,8 +74,12 @@ int dircache_get_cache_size(void);
90int dircache_get_reserve_used(void); 74int dircache_get_reserve_used(void);
91int dircache_get_build_ticks(void); 75int dircache_get_build_ticks(void);
92void dircache_disable(void); 76void dircache_disable(void);
93const struct dircache_entry *dircache_get_entry_ptr(const char *filename); 77int dircache_get_entry_id(const char *filename);
94size_t dircache_copy_path(const struct dircache_entry *entry, char *buf, size_t size); 78size_t dircache_copy_path(int index, char *buf, size_t size);
79
80/* the next two are internal for file.c */
81long _dircache_get_entry_startcluster(int id);
82struct dirinfo* _dircache_get_entry_dirinfo(int id);
95 83
96void dircache_bind(int fd, const char *path); 84void dircache_bind(int fd, const char *path);
97void dircache_update_filesize(int fd, long newsize, long startcluster); 85void dircache_update_filesize(int fd, long newsize, long startcluster);