diff options
author | Brian Carlstrom <bdc@google.com> | 2013-10-28 21:24:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-10-28 21:24:51 +0000 |
commit | 87af04a42ec2d959cced0f1c01888f9cf3b2b9c5 (patch) | |
tree | a57a9824f01294e3b47c2f9d815c0c886217b76e | |
parent | 4d87e743083c201edd0b565dd7d42e70945a6265 (diff) | |
parent | 93c91fad77dc9516954a606e6199e8a940d99388 (diff) | |
download | system_core-87af04a42ec2d959cced0f1c01888f9cf3b2b9c5.zip system_core-87af04a42ec2d959cced0f1c01888f9cf3b2b9c5.tar.gz system_core-87af04a42ec2d959cced0f1c01888f9cf3b2b9c5.tar.bz2 |
Merge "Improve some adb error logging"
-rw-r--r-- | adb/adb_client.c | 4 | ||||
-rw-r--r-- | adb/commandline.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/adb/adb_client.c b/adb/adb_client.c index 8340738..f7823a8 100644 --- a/adb/adb_client.c +++ b/adb/adb_client.c @@ -278,7 +278,9 @@ int adb_connect(const char *service) return 0; fd = _adb_connect(service); - if(fd == -2) { + if(fd == -1) { + fprintf(stderr,"error: %s\n", __adb_error); + } else if(fd == -2) { fprintf(stderr,"** daemon still not running\n"); } D("adb_connect: return fd %d\n", fd); diff --git a/adb/commandline.c b/adb/commandline.c index 27a1754..c9bb437 100644 --- a/adb/commandline.c +++ b/adb/commandline.c @@ -767,7 +767,7 @@ static int restore(int argc, char** argv) { fd = adb_connect("restore:"); if (fd < 0) { - fprintf(stderr, "adb: unable to connect for backup\n"); + fprintf(stderr, "adb: unable to connect for restore\n"); adb_close(tarFd); return -1; } |