summaryrefslogtreecommitdiff
path: root/firmware/common/dir_uncached.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 /firmware/common/dir_uncached.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 'firmware/common/dir_uncached.c')
-rw-r--r--firmware/common/dir_uncached.c10
1 files changed, 5 insertions, 5 deletions
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)
171 if (fat_ismounted(dir->volumecounter)) 171 if (fat_ismounted(dir->volumecounter))
172 { 172 {
173 memset(theent, 0, sizeof(*theent)); 173 memset(theent, 0, sizeof(*theent));
174 theent->attribute = FAT_ATTR_DIRECTORY | FAT_ATTR_VOLUME; 174 theent->info.attribute = FAT_ATTR_DIRECTORY | FAT_ATTR_VOLUME;
175 snprintf(theent->d_name, sizeof(theent->d_name), 175 snprintf(theent->d_name, sizeof(theent->d_name),
176 VOL_NAMES, dir->volumecounter); 176 VOL_NAMES, dir->volumecounter);
177 return theent; 177 return theent;
@@ -187,11 +187,11 @@ struct dirent_uncached* readdir_uncached(DIR_UNCACHED* dir)
187 return NULL; 187 return NULL;
188 188
189 strlcpy(theent->d_name, entry.name, sizeof(theent->d_name)); 189 strlcpy(theent->d_name, entry.name, sizeof(theent->d_name));
190 theent->attribute = entry.attr; 190 theent->info.attribute = entry.attr;
191 theent->size = entry.filesize; 191 theent->info.wrtdate = entry.wrtdate;
192 theent->info.wrttime = entry.wrttime;
193 theent->info.size = entry.filesize;
192 theent->startcluster = entry.firstcluster; 194 theent->startcluster = entry.firstcluster;
193 theent->wrtdate = entry.wrtdate;
194 theent->wrttime = entry.wrttime;
195 195
196 return theent; 196 return theent;
197} 197}