aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/utils/bufprint.c5
-rw-r--r--hw/goldfish_nand.c2
2 files changed, 5 insertions, 2 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
diff --git a/hw/goldfish_nand.c b/hw/goldfish_nand.c
index 933edc9..af921b7 100644
--- a/hw/goldfish_nand.c
+++ b/hw/goldfish_nand.c
@@ -708,7 +708,7 @@ void nand_add_dev(const char *arg)
TempFile* tmp = tempfile_create();
if (tmp == NULL) {
- XLOG("could not create temp file for %.*s NAND disk image: %s",
+ XLOG("could not create temp file for %.*s NAND disk image: %s\n",
devname_len, devname, strerror(errno));
exit(1);
}