aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2011-09-13 12:32:52 +0200
committerDavid 'Digit' Turner <digit@google.com>2011-09-13 12:32:52 +0200
commit9ff69721d24f81317183ddb2e9e352bb34650752 (patch)
tree8eb631be103604e89407dcf57062dcc6de5b1141 /android/main.c
parente94d48fc15255bda6b230a8054665ceef49afbc0 (diff)
downloadexternal_qemu-9ff69721d24f81317183ddb2e9e352bb34650752.zip
external_qemu-9ff69721d24f81317183ddb2e9e352bb34650752.tar.gz
external_qemu-9ff69721d24f81317183ddb2e9e352bb34650752.tar.bz2
Fix -ramdisk option handling.
For some reason, there was a bug, where the option was being ignored if set from the command-line. Change-Id: I61c6e3127b469f4ec661b834b15c4da0841551af
Diffstat (limited to 'android/main.c')
-rw-r--r--android/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/android/main.c b/android/main.c
index f20ea7b..8fb9485 100644
--- a/android/main.c
+++ b/android/main.c
@@ -485,8 +485,15 @@ int main(int argc, char **argv)
args[n++] = opts->dns_server;
}
- hw->disk_ramdisk_path = avdInfo_getRamdiskPath(avd);
- D("autoconfig: -ramdisk %s", hw->disk_ramdisk_path);
+ /* opts->ramdisk is never NULL (see createAVD) here */
+ if (opts->ramdisk) {
+ AFREE(hw->disk_ramdisk_path);
+ hw->disk_ramdisk_path = ASTRDUP(opts->ramdisk);
+ }
+ else if (!hw->disk_ramdisk_path[0]) {
+ hw->disk_ramdisk_path = avdInfo_getRamdiskPath(avd);
+ D("autoconfig: -ramdisk %s", hw->disk_ramdisk_path);
+ }
/* -partition-size is used to specify the max size of both the system
* and data partition sizes.