From 91f165e3daa0957aa27f3439ca60eede128e441e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 5 May 2002 10:28:23 +0000 Subject: support open() properly so that the root dir works in the archos subdir git-svn-id: svn://svn.rockbox.org/rockbox/trunk@425 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/x11/io.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'uisimulator') diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c index 4c1e594047..9551d101bb 100644 --- a/uisimulator/x11/io.c +++ b/uisimulator/x11/io.c @@ -13,3 +13,16 @@ DIR *x11_opendir(char *name) } return opendir(name); } + +int x11_open(char *name, int opts) +{ + char buffer[256]; /* sufficiently big */ + + if(name[0] == '/') { + sprintf(buffer, "%s/%s", SIMULATOR_ARCHOS_ROOT, name); + + Logf("We open the real file '%s'", buffer); + return open(buffer, opts); + } + return open(name, opts); +} -- cgit v1.2.3