summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-09-01 21:29:34 +0000
committerThomas Martitz <kugel@rockbox.org>2010-09-01 21:29:34 +0000
commit6eaab4d00446c070c655f0e6c9a872532a776b6f (patch)
tree69610996dd0a6092459b14e164d4e48e03b1e5bb /apps/tagcache.c
parent8e0a0babc57db3e9edc06f3e269fb47c27292ed5 (diff)
downloadrockbox-6eaab4d00446c070c655f0e6c9a872532a776b6f.tar.gz
rockbox-6eaab4d00446c070c655f0e6c9a872532a776b6f.zip
Ged rid of uisimulator/common/io.c for android builds.
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants. Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know). For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one, the values can be retrieved via the new dir_get_info(). Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 6e416dd7f8..a6cfb4c590 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -4222,6 +4222,8 @@ static bool check_dir(const char *dirname, int add_files)
4222 success = true; 4222 success = true;
4223 break ; 4223 break ;
4224 } 4224 }
4225
4226 struct dirinfo info = dir_get_info(dir, entry);
4225 4227
4226 if (!strcmp((char *)entry->d_name, ".") || 4228 if (!strcmp((char *)entry->d_name, ".") ||
4227 !strcmp((char *)entry->d_name, "..")) 4229 !strcmp((char *)entry->d_name, ".."))
@@ -4234,14 +4236,14 @@ static bool check_dir(const char *dirname, int add_files)
4234 entry->d_name); 4236 entry->d_name);
4235 4237
4236 processed_dir_count++; 4238 processed_dir_count++;
4237 if (entry->attribute & ATTR_DIRECTORY) 4239 if (info.attribute & ATTR_DIRECTORY)
4238 check_dir(curpath, add_files); 4240 check_dir(curpath, add_files);
4239 else if (add_files) 4241 else if (add_files)
4240 { 4242 {
4241 tc_stat.curentry = curpath; 4243 tc_stat.curentry = curpath;
4242 4244
4243 /* Add a new entry to the temporary db file. */ 4245 /* Add a new entry to the temporary db file. */
4244 add_tagcache(curpath, (entry->wrtdate << 16) | entry->wrttime 4246 add_tagcache(curpath, (info.wrtdate << 16) | info.wrttime
4245#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) 4247#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
4246 , dir->internal_entry 4248 , dir->internal_entry
4247#endif 4249#endif