diff options
author | Raphael <raphael@google.com> | 2010-11-01 15:29:34 -0700 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2010-11-16 10:52:51 -0800 |
commit | 2779beecc7410f29102125e87e8174597acb2fe5 (patch) | |
tree | 5957232f7353ab1a18fe33c5ec0a59f0835d70e9 /android/utils | |
parent | 8285461fa8cdd05cb229a4a73df13b3b8e7766dc (diff) | |
download | external_qemu-2779beecc7410f29102125e87e8174597acb2fe5.zip external_qemu-2779beecc7410f29102125e87e8174597acb2fe5.tar.gz external_qemu-2779beecc7410f29102125e87e8174597acb2fe5.tar.bz2 |
Add env var ANDROID_TMP to override /tmp/android location.
This is needed if there's already a /tmp/android which the current user
can't access on the system. It would prevent the emulator from starting
with a cryptic error message:
NAND: could not create temp file for system NAND disk image: Permission deniedemulator: User-config was not changed.
SDK Bug: 3154431
Change-Id: Iefe7fd6a5139da545aaef5670fb7f42d210d0edc
Diffstat (limited to 'android/utils')
-rw-r--r-- | android/utils/bufprint.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/android/utils/bufprint.c b/android/utils/bufprint.c index 45d411f..e3aa63c 100644 --- a/android/utils/bufprint.c +++ b/android/utils/bufprint.c @@ -215,7 +215,10 @@ bufprint_temp_dir(char* buff, char* end) return bufprint(buff, end, "%s", path); #else - const char* tmppath = "/tmp/android"; + const char* tmppath = getenv("ANDROID_TMP"); + if (!tmppath) { + tmppath = "/tmp/android"; + } mkdir(tmppath, 0744); return bufprint(buff, end, "%s", tmppath ); #endif |