diff options
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/dircache.h | 26 |
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 | ||
51 | struct fdbind_queue { | ||
52 | char path[MAX_PATH]; | ||
53 | int fd; | ||
54 | }; | ||
55 | |||
56 | /* Exported structures. */ | ||
57 | struct 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 | |||
66 | struct dirent_cached { | 50 | struct 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 { | |||
72 | typedef struct { | 56 | typedef 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); | |||
90 | int dircache_get_reserve_used(void); | 74 | int dircache_get_reserve_used(void); |
91 | int dircache_get_build_ticks(void); | 75 | int dircache_get_build_ticks(void); |
92 | void dircache_disable(void); | 76 | void dircache_disable(void); |
93 | const struct dircache_entry *dircache_get_entry_ptr(const char *filename); | 77 | int dircache_get_entry_id(const char *filename); |
94 | size_t dircache_copy_path(const struct dircache_entry *entry, char *buf, size_t size); | 78 | size_t dircache_copy_path(int index, char *buf, size_t size); |
79 | |||
80 | /* the next two are internal for file.c */ | ||
81 | long _dircache_get_entry_startcluster(int id); | ||
82 | struct dirinfo* _dircache_get_entry_dirinfo(int id); | ||
95 | 83 | ||
96 | void dircache_bind(int fd, const char *path); | 84 | void dircache_bind(int fd, const char *path); |
97 | void dircache_update_filesize(int fd, long newsize, long startcluster); | 85 | void dircache_update_filesize(int fd, long newsize, long startcluster); |