diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-09-01 21:29:34 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-09-01 21:29:34 +0000 |
commit | 6eaab4d00446c070c655f0e6c9a872532a776b6f (patch) | |
tree | 69610996dd0a6092459b14e164d4e48e03b1e5bb /firmware/include/dir_uncached.h | |
parent | 8e0a0babc57db3e9edc06f3e269fb47c27292ed5 (diff) | |
download | rockbox-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/include/dir_uncached.h')
-rw-r--r-- | firmware/include/dir_uncached.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/firmware/include/dir_uncached.h b/firmware/include/dir_uncached.h index f225cf8e39..5c7ed14658 100644 --- a/firmware/include/dir_uncached.h +++ b/firmware/include/dir_uncached.h | |||
@@ -21,18 +21,20 @@ | |||
21 | #ifndef _DIR_UNCACHED_H_ | 21 | #ifndef _DIR_UNCACHED_H_ |
22 | #define _DIR_UNCACHED_H_ | 22 | #define _DIR_UNCACHED_H_ |
23 | 23 | ||
24 | #include "config.h" | ||
25 | |||
26 | struct dirinfo { | ||
27 | int attribute; | ||
28 | long size; | ||
29 | unsigned short wrtdate; | ||
30 | unsigned short wrttime; | ||
31 | }; | ||
32 | |||
33 | #ifndef APPLICATION | ||
24 | #include <stdbool.h> | 34 | #include <stdbool.h> |
25 | #include "file.h" | 35 | #include "file.h" |
26 | 36 | ||
27 | #define ATTR_READ_ONLY 0x01 | 37 | #if (CONFIG_PLATFORM & PLATFORM_SDL) |
28 | #define ATTR_HIDDEN 0x02 | ||
29 | #define ATTR_SYSTEM 0x04 | ||
30 | #define ATTR_VOLUME_ID 0x08 | ||
31 | #define ATTR_DIRECTORY 0x10 | ||
32 | #define ATTR_ARCHIVE 0x20 | ||
33 | #define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */ | ||
34 | |||
35 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | ||
36 | #define dirent_uncached sim_dirent | 38 | #define dirent_uncached sim_dirent |
37 | #define DIR_UNCACHED SIM_DIR | 39 | #define DIR_UNCACHED SIM_DIR |
38 | #define opendir_uncached sim_opendir | 40 | #define opendir_uncached sim_opendir |
@@ -46,11 +48,8 @@ | |||
46 | 48 | ||
47 | struct dirent_uncached { | 49 | struct dirent_uncached { |
48 | unsigned char d_name[MAX_PATH]; | 50 | unsigned char d_name[MAX_PATH]; |
49 | int attribute; | 51 | struct dirinfo info; |
50 | long size; | ||
51 | long startcluster; | 52 | long startcluster; |
52 | unsigned short wrtdate; /* Last write date */ | ||
53 | unsigned short wrttime; /* Last write time */ | ||
54 | }; | 53 | }; |
55 | #endif | 54 | #endif |
56 | 55 | ||
@@ -92,5 +91,6 @@ extern struct dirent_uncached* readdir_uncached(DIR_UNCACHED* dir); | |||
92 | extern int release_dirs(int volume); | 91 | extern int release_dirs(int volume); |
93 | 92 | ||
94 | #endif /* DIRFUNCTIONS_DEFINED */ | 93 | #endif /* DIRFUNCTIONS_DEFINED */ |
94 | #endif | ||
95 | 95 | ||
96 | #endif | 96 | #endif |