aboutsummaryrefslogtreecommitdiffstats
path: root/android/avd
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-05-04 22:59:26 +0200
committerDavid 'Digit' Turner <digit@android.com>2011-05-04 22:59:26 +0200
commit107be29100b6c422c8be58ca898687bf99534350 (patch)
tree1179efb40d6d1587dfeb7729b78e27618bab784d /android/avd
parent46fd095b9f5d7e2434cebd407435e662f8e2df54 (diff)
downloadexternal_qemu-107be29100b6c422c8be58ca898687bf99534350.zip
external_qemu-107be29100b6c422c8be58ca898687bf99534350.tar.gz
external_qemu-107be29100b6c422c8be58ca898687bf99534350.tar.bz2
Fix ANDROID_SDK_HOME handling.
A previous patch introducing the "emulator" launcher program did regress the way ANDROID_SDK_HOME is parsed. Fix that by actually trusting bufprint_config_path() to always do the right thing :-) Change-Id: I11a13fea95727ee9c487595fd4ae5e81805986da
Diffstat (limited to 'android/avd')
-rw-r--r--android/avd/util.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/android/avd/util.c b/android/avd/util.c
index fdeb0fe..2ba4117 100644
--- a/android/avd/util.c
+++ b/android/avd/util.c
@@ -100,19 +100,12 @@ path_getRootIniPath( const char* avdName )
char*
path_getSdkHome(void)
{
- const char* sdkHome = getenv("ANDROID_SDK_HOME");
-
- if (sdkHome == NULL || *sdkHome == '\0') {
- char temp[PATH_MAX], *p=temp, *end=p+sizeof(temp);
- p = bufprint_config_path(temp, end);
- if (p >= end) {
- APANIC("User path too long!: %s\n", temp);
- }
- sdkHome = strdup(temp);
- } else {
- sdkHome = strdup(sdkHome);
+ char temp[PATH_MAX], *p=temp, *end=p+sizeof(temp);
+ p = bufprint_config_path(temp, end);
+ if (p >= end) {
+ APANIC("User path too long!: %s\n", temp);
}
- return (char*)sdkHome;
+ return strdup(temp);
}