summaryrefslogtreecommitdiff
path: root/firmware/common
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-03-26 11:33:42 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-03-26 11:33:42 +0000
commit7c4e0c8730d5b076d4db4206361bc38d5256a23f (patch)
tree43382ae25de9bfa0bbabdff7d51c32b651ad47b5 /firmware/common
parent50d40ea43409745bc828e56af5e3879ea6b48cf1 (diff)
downloadrockbox-7c4e0c8730d5b076d4db4206361bc38d5256a23f.tar.gz
rockbox-7c4e0c8730d5b076d4db4206361bc38d5256a23f.zip
Initial version of tagcache! There are still some bugs in the engine
and much more problems with the UI. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9256 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common')
-rw-r--r--firmware/common/dircache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index 4facbb8ab2..f9fd63b8e4 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -84,8 +84,8 @@ static struct dircache_entry* allocate_entry(void)
84 /* Make sure the entry is long aligned. */ 84 /* Make sure the entry is long aligned. */
85 if ((long)next_entry & 0x03) 85 if ((long)next_entry & 0x03)
86 { 86 {
87 next_entry = (struct dircache_entry *)(((long)next_entry & ~0x03) + 0x04);
88 dircache_size += 4 - ((long)next_entry & 0x03); 87 dircache_size += 4 - ((long)next_entry & 0x03);
88 next_entry = (struct dircache_entry *)(((long)next_entry & ~0x03) + 0x04);
89 } 89 }
90#endif 90#endif
91 next_entry->name_len = 0; 91 next_entry->name_len = 0;
@@ -95,7 +95,6 @@ static struct dircache_entry* allocate_entry(void)
95 next_entry->next = NULL; 95 next_entry->next = NULL;
96 96
97 dircache_size += sizeof(struct dircache_entry); 97 dircache_size += sizeof(struct dircache_entry);
98 entry_count++;
99 98
100 return next_entry; 99 return next_entry;
101} 100}
@@ -186,6 +185,7 @@ static int dircache_scan(struct travel_data *td)
186 td->ce->wrttime = td->entry.wrttime; 185 td->ce->wrttime = td->entry.wrttime;
187 memcpy(td->ce->d_name, td->entry.name, td->ce->name_len); 186 memcpy(td->ce->d_name, td->entry.name, td->ce->name_len);
188 dircache_size += td->ce->name_len; 187 dircache_size += td->ce->name_len;
188 entry_count++;
189 189
190 if (td->entry.attr & FAT_ATTR_DIRECTORY) 190 if (td->entry.attr & FAT_ATTR_DIRECTORY)
191 { 191 {