aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-02-25 16:43:34 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-03-01 15:31:11 +0100
commitc480cca8d2007f5df62a7431beda310911b963e6 (patch)
treee3653361f360a21e7528c39e86638ada37d644c3 /vl-android.c
parent0b0194940523fa3f318c380d0693907bd522241c (diff)
downloadexternal_qemu-c480cca8d2007f5df62a7431beda310911b963e6.zip
external_qemu-c480cca8d2007f5df62a7431beda310911b963e6.tar.gz
external_qemu-c480cca8d2007f5df62a7431beda310911b963e6.tar.bz2
Move cache partition initialization to core.
Change-Id: I1f887e6f8fc38e43b1fff3f7bab3814b52542762
Diffstat (limited to 'vl-android.c')
-rw-r--r--vl-android.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/vl-android.c b/vl-android.c
index d5b37ae..379741b 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -4969,6 +4969,25 @@ int main(int argc, char **argv, char **envp)
}
#endif // CONFIG_MEMCHECK
+ /* Initialize cache partition, if any */
+ if (android_hw->disk_cachePartition != 0) {
+ char tmp[PATH_MAX+32];
+ const char* partPath = android_hw->disk_cachePartition_path;
+ uint32_t partSize = android_hw->disk_cachePartition_size;
+
+ if (!partPath || !*partPath || !strcmp(partPath, "<temp>"))
+ {
+ /* Use temporary cache partition */
+ snprintf(tmp, sizeof(tmp), "cache,size=0x%x", partSize);
+ }
+ else
+ {
+ /* Use specific cache partition */
+ snprintf(tmp, sizeof(tmp), "cache,size=0x%x,file=%s", partSize, partPath);
+ }
+ nand_add_dev(tmp);
+ }
+
#if defined(CONFIG_KVM) && defined(CONFIG_KQEMU)
if (kvm_allowed && kqemu_allowed) {
PANIC(