From 6eaab4d00446c070c655f0e6c9a872532a776b6f Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 1 Sep 2010 21:29:34 +0000 Subject: 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 --- firmware/common/dir_uncached.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'firmware/common/dir_uncached.c') diff --git a/firmware/common/dir_uncached.c b/firmware/common/dir_uncached.c index e3e33a4c11..2ce23e8b8e 100644 --- a/firmware/common/dir_uncached.c +++ b/firmware/common/dir_uncached.c @@ -171,7 +171,7 @@ struct dirent_uncached* readdir_uncached(DIR_UNCACHED* dir) if (fat_ismounted(dir->volumecounter)) { memset(theent, 0, sizeof(*theent)); - theent->attribute = FAT_ATTR_DIRECTORY | FAT_ATTR_VOLUME; + theent->info.attribute = FAT_ATTR_DIRECTORY | FAT_ATTR_VOLUME; snprintf(theent->d_name, sizeof(theent->d_name), VOL_NAMES, dir->volumecounter); return theent; @@ -187,11 +187,11 @@ struct dirent_uncached* readdir_uncached(DIR_UNCACHED* dir) return NULL; strlcpy(theent->d_name, entry.name, sizeof(theent->d_name)); - theent->attribute = entry.attr; - theent->size = entry.filesize; + theent->info.attribute = entry.attr; + theent->info.wrtdate = entry.wrtdate; + theent->info.wrttime = entry.wrttime; + theent->info.size = entry.filesize; theent->startcluster = entry.firstcluster; - theent->wrtdate = entry.wrtdate; - theent->wrttime = entry.wrttime; return theent; } -- cgit v1.2.3