diff options
author | David 'Digit' Turner <digit@google.com> | 2010-04-15 15:04:16 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2010-04-15 15:04:16 -0700 |
commit | 92568958dd42bf35667cc6451b5edd7f7d1f73a1 (patch) | |
tree | 573e33581b6db6dfc9efc1ac34104887e994b015 /android/main.c | |
parent | fbcab322c2a12bfe49d0faaef91fccdc7bb97d4e (diff) | |
download | external_qemu-92568958dd42bf35667cc6451b5edd7f7d1f73a1.zip external_qemu-92568958dd42bf35667cc6451b5edd7f7d1f73a1.tar.gz external_qemu-92568958dd42bf35667cc6451b5edd7f7d1f73a1.tar.bz2 |
Revert previous patch to fix SD Card emulation
The previous patch modifies SD Card hardware emulation in a way that is
not backwards compatible with previous SDK platform releases. This has
the unfortunate effect of making SD Card emulation not work properly
when running existing AVDs.
Reverting the patch until we get a better one.
Change-Id: I82dac87709d88aa3bd292bf2ed0008ae74d95853
Diffstat (limited to 'android/main.c')
-rw-r--r-- | android/main.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/android/main.c b/android/main.c index 309adf6..7ff7910 100644 --- a/android/main.c +++ b/android/main.c @@ -1798,7 +1798,6 @@ int main(int argc, char **argv) int n; char* opt; int use_sdcard_img = 0; - int use_sdcard2_img = 0; int serial = 0; int gps_serial = 0; int radio_serial = 0; @@ -2063,14 +2062,6 @@ int main(int argc, char **argv) D("autoconfig: -sdcard %s", opts->sdcard); } } - - if (!opts->sdcard2 && opts->datadir) { - bufprint(tmp, tmpend, "%s/sdcard2.img", opts->datadir); - if (path_exists(tmp)) { - opts->sdcard2 = qemu_strdup(tmp); - D("autoconfig: -sdcard2 %s", opts->sdcard2); - } - } } /* setup the virtual device parameters from our options @@ -2091,7 +2082,6 @@ int main(int argc, char **argv) _forceAvdImagePath(AVD_IMAGE_USERDATA, opts->data, "user data", 0); _forceAvdImagePath(AVD_IMAGE_CACHE, opts->cache, "cache", 0); _forceAvdImagePath(AVD_IMAGE_SDCARD, opts->sdcard, "SD Card", 0); - _forceAvdImagePath(AVD_IMAGE_SDCARD2, opts->sdcard2, "SD Card 2", 0); /* we don't accept -skindir without -skin now * to simplify the autoconfig stuff with virtual devices @@ -2490,14 +2480,11 @@ int main(int argc, char **argv) args[n++] = strdup(tmp); } - if (hw->hw_sdCard != 0) { + if (hw->hw_sdCard != 0) opts->sdcard = (char*) avdInfo_getImageFile(avd, AVD_IMAGE_SDCARD); - opts->sdcard2 = (char*) avdInfo_getImageFile(avd, AVD_IMAGE_SDCARD2); - - } else if (opts->sdcard || opts->sdcard2) { + else if (opts->sdcard) { dwarning( "Emulated hardware doesn't support SD Cards" ); opts->sdcard = NULL; - opts->sdcard2 = NULL; } if(opts->sdcard) { @@ -2519,25 +2506,6 @@ int main(int argc, char **argv) } } - if(opts->sdcard2) { - uint64_t size; - if (path_get_size(opts->sdcard2, &size) == 0) { - /* see if we have an sdcard image. get its size if it exists */ - /* due to what looks like limitations of the MMC protocol, one has - * to use an SD Card image that is equal or larger than 9 MB - */ - if (size < 9*1024*1024ULL) { - fprintf(stderr, "### WARNING: SD Card files must be at least 9MB, ignoring '%s'\n", opts->sdcard2); - } else { - args[n++] = "-hdb"; - args[n++] = opts->sdcard2; - use_sdcard2_img = 1; - } - } else { - D("no SD Card image at '%s'", opts->sdcard2); - } - } - if (!opts->logcat || opts->logcat[0] == 0) { opts->logcat = getenv("ANDROID_LOG_TAGS"); if (opts->logcat && opts->logcat[0] == 0) |