summaryrefslogtreecommitdiff
path: root/apps/misc.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/misc.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/misc.c')
-rw-r--r--apps/misc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/misc.c b/apps/misc.c
index c35e2c5001..4b89a5d4a3 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -28,6 +28,7 @@
28#include "misc.h" 28#include "misc.h"
29#include "lcd.h" 29#include "lcd.h"
30#include "file.h" 30#include "file.h"
31#include "filefuncs.h"
31#ifndef __PCTOOL__ 32#ifndef __PCTOOL__
32#include "lang.h" 33#include "lang.h"
33#include "dir.h" 34#include "dir.h"
@@ -708,11 +709,12 @@ void check_bootfile(bool do_rolo)
708 { 709 {
709 if(!strcasecmp(entry->d_name, BOOTFILE)) 710 if(!strcasecmp(entry->d_name, BOOTFILE))
710 { 711 {
712 struct dirinfo info = dir_get_info(dir, entry);
711 /* found the bootfile */ 713 /* found the bootfile */
712 if(wrtdate && do_rolo) 714 if(wrtdate && do_rolo)
713 { 715 {
714 if((entry->wrtdate != wrtdate) || 716 if((info.wrtdate != wrtdate) ||
715 (entry->wrttime != wrttime)) 717 (info.wrttime != wrttime))
716 { 718 {
717 static const char *lines[] = { ID2P(LANG_BOOT_CHANGED), 719 static const char *lines[] = { ID2P(LANG_BOOT_CHANGED),
718 ID2P(LANG_REBOOT_NOW) }; 720 ID2P(LANG_REBOOT_NOW) };
@@ -722,8 +724,8 @@ void check_bootfile(bool do_rolo)
722 rolo_load(BOOTDIR "/" BOOTFILE); 724 rolo_load(BOOTDIR "/" BOOTFILE);
723 } 725 }
724 } 726 }
725 wrtdate = entry->wrtdate; 727 wrtdate = info.wrtdate;
726 wrttime = entry->wrttime; 728 wrttime = info.wrttime;
727 } 729 }
728 } 730 }
729 closedir(dir); 731 closedir(dir);