diff options
author | John Grossman <johngro@google.com> | 2012-08-20 16:48:13 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-08-20 16:48:13 -0700 |
commit | 9dd0029a05511d5e15c7fdb453b93f50d5b37d04 (patch) | |
tree | c149844bce7f2e4fb4714cd4bf7a27f0a7d44064 | |
parent | a8b832a89713dea6d1a82cfc8ecfa624c4fc5783 (diff) | |
parent | 9367f4f973e0d4dfb1fe898709f0246dce6f81aa (diff) | |
download | system_core-9dd0029a05511d5e15c7fdb453b93f50d5b37d04.zip system_core-9dd0029a05511d5e15c7fdb453b93f50d5b37d04.tar.gz system_core-9dd0029a05511d5e15c7fdb453b93f50d5b37d04.tar.bz2 |
Merge "Replace a segfault with a warning." into jb-mr1-dev
-rw-r--r-- | adb/adb.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1024,7 +1024,13 @@ int adb_main(int is_daemon, int server_port) // Our external storage path may be different than apps, since // we aren't able to bind mount after dropping root. - setenv("EXTERNAL_STORAGE", getenv("ADB_EXTERNAL_STORAGE"), 1); + const char* adb_external_storage = getenv("ADB_EXTERNAL_STORAGE"); + if (NULL != adb_external_storage) { + setenv("EXTERNAL_STORAGE", adb_external_storage, 1); + } else { + D("Warning: ADB_EXTERNAL_STORAGE is not set. Leaving EXTERNAL_STORAGE" + " unchanged.\n"); + } /* don't listen on a port (default 5037) if running in secure mode */ /* don't run as root if we are running in secure mode */ |