From 86cab2e27a0d9f831b39032fd713945659277903 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 9 Feb 2011 20:27:23 +0000 Subject: Disable buffering codecs (and code generally) on RaaA. It's not useful to do it since you need to write back the code to disk to be able to load it from memory, it also requires writing to an executable directory. Keep it for the simulator for the sake of simulating. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29261 a1c6a512-1295-4272-9138-f99709370657 --- firmware/load_code.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'firmware/load_code.c') diff --git a/firmware/load_code.c b/firmware/load_code.c index 2337ee5cad..59eb7ac0f7 100644 --- a/firmware/load_code.c +++ b/firmware/load_code.c @@ -134,6 +134,16 @@ void * _lc_open(const _lc_open_char *filename, unsigned char *buf, size_t buf_si void *lc_open_from_mem(void *addr, size_t blob_size) { +#ifndef SIMULATOR + (void)addr; + (void)blob_size; + /* we don't support loading code from memory on application builds, + * it doesn't make sense (since it means writing the blob to disk again and + * then falling back to load from disk) and requires the ability to write + * to an executable directory */ + return NULL; +#else + /* support it in the sim for the sake of simulating */ int fd, i; char temp_filename[MAX_PATH]; @@ -143,17 +153,8 @@ void *lc_open_from_mem(void *addr, size_t blob_size) to find an unused filename */ for (i = 0; i < 10; i++) { -#if (CONFIG_PLATFORM & PLATFORM_ANDROID) - /* we need that path fixed, since _get_user_file_path() - * gives us the folder on the sdcard where we cannot load libraries - * from (no exec permissions) - */ - snprintf(temp_filename, sizeof(temp_filename), - "/data/data/org.rockbox/app_rockbox/libtemp_binary_%d.so", i); -#else snprintf(temp_filename, sizeof(temp_filename), ROCKBOX_DIR "/libtemp_binary_%d.dll", i); -#endif fd = open(temp_filename, O_WRONLY|O_CREAT|O_TRUNC, 0700); if (fd >= 0) break; /* Created a file ok */ @@ -175,6 +176,7 @@ void *lc_open_from_mem(void *addr, size_t blob_size) close(fd); return lc_open(temp_filename, NULL, 0); +#endif } -- cgit v1.2.3