diff options
author | Steve Kondik <steve@cyngn.com> | 2016-03-10 19:48:40 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-03-11 12:20:26 -0800 |
commit | 81fba043fafba2576ba3ce7a087347b79e162260 (patch) | |
tree | 39a7d471e2d72248c4701a24b47670d4ad6ea746 /adb | |
parent | 36060ddbd0fa003c808218fa62afbcb65a5f0878 (diff) | |
parent | b84295d027c9d86720d93e19eb5c1b644553d647 (diff) | |
download | system_core-81fba043fafba2576ba3ce7a087347b79e162260.zip system_core-81fba043fafba2576ba3ce7a087347b79e162260.tar.gz system_core-81fba043fafba2576ba3ce7a087347b79e162260.tar.bz2 |
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/system/core into cm-13.0
Android 6.0.1 release 22
Change-Id: Ia61f8e863f7413a67fe65f41ea2a30c086528df4
Diffstat (limited to 'adb')
-rw-r--r-- | adb/adb.cpp | 2 | ||||
-rw-r--r-- | adb/commandline.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/adb/adb.cpp b/adb/adb.cpp index f64b19f..c09aee3 100644 --- a/adb/adb.cpp +++ b/adb/adb.cpp @@ -919,7 +919,7 @@ int handle_host_request(char *service, transport_type ttype, char* serial, int r if(!strncmp(service,"get-state",strlen("get-state"))) { transport = acquire_one_transport(CS_ANY, ttype, serial, NULL); SendOkay(reply_fd); - SendProtocolString(reply_fd, transport->connection_state_name()); + SendProtocolString(reply_fd, transport ? transport->connection_state_name() : "unknown"); return 0; } #endif // ADB_HOST diff --git a/adb/commandline.cpp b/adb/commandline.cpp index d38588f..26eea2f 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp @@ -756,8 +756,10 @@ static int logcat(transport_type transport, const char* serial, int argc, const static int mkdirs(const char *path) { + std::string holder(path); + int ret; - char *x = (char *)path + 1; + char *x = &holder[1]; for(;;) { x = adb_dirstart(x); @@ -774,7 +776,7 @@ static int mkdirs(const char *path) } static int backup(int argc, const char** argv) { - const char* filename = "./backup.ab"; + const char* filename = "backup.ab"; /* find, extract, and use any -f argument */ for (int i = 1; i < argc; i++) { |