diff options
author | ctso <ctsoyars@gmail.com> | 2010-06-23 21:57:38 +0000 |
---|---|---|
committer | ctso <ctsoyars@gmail.com> | 2010-06-23 21:57:38 +0000 |
commit | 61229acdcc8d1147ddea0df79db59041551b6fdf (patch) | |
tree | 41a0df0f0843b4558ef847b423f279ed389c84d4 /cmds | |
parent | 9078e77ad95198ee4829951144df05c8ebe4fb2c (diff) | |
download | frameworks_base-61229acdcc8d1147ddea0df79db59041551b6fdf.zip frameworks_base-61229acdcc8d1147ddea0df79db59041551b6fdf.tar.gz frameworks_base-61229acdcc8d1147ddea0df79db59041551b6fdf.tar.bz2 |
Use /cache/dalvik-cache for system dex files.
Conflicts:
cmds/installd/installd.h
Change-Id: Ib0795f95ee440c21acff11f3939ddda2acb09e66
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 8 | ||||
-rw-r--r-- | cmds/installd/installd.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index cce7c13..ccc6601 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -417,7 +417,9 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src) return -1; } - dstlen = srclen + strlen(DALVIK_CACHE_PREFIX) + + const char *cache_path = strncmp(src, "/system", 7) ? DALVIK_CACHE_PREFIX : DALVIK_SYSTEM_CACHE_PREFIX; + + dstlen = srclen + strlen(cache_path) + strlen(DALVIK_CACHE_POSTFIX) + 1; if (dstlen > PKG_PATH_MAX) { @@ -425,11 +427,11 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src) } sprintf(path,"%s%s%s", - DALVIK_CACHE_PREFIX, + cache_path, src + 1, /* skip the leading / */ DALVIK_CACHE_POSTFIX); - for(tmp = path + strlen(DALVIK_CACHE_PREFIX); *tmp; tmp++) { + for(tmp = path + strlen(cache_path); *tmp; tmp++) { if (*tmp == '/') { *tmp = '@'; } diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h index cfcdb98..ddefc6f 100644 --- a/cmds/installd/installd.h +++ b/cmds/installd/installd.h @@ -67,6 +67,7 @@ #define DALVIK_CACHE_POSTFIX "/classes.dex" #define UPDATE_COMMANDS_DIR_PREFIX "/system/etc/updatecmds/" +#define DALVIK_SYSTEM_CACHE_PREFIX "/cache/dalvik-cache/" #define PKG_NAME_MAX 128 /* largest allowed package name */ #define PKG_PATH_MAX 256 /* max size of any path we use */ |