Add WriteFdFmt and clean up more code.
Also say *which* device wasn't found.
Bug: http://b/20666660
Change-Id: I50e234ad89e39ae0a8995083c0b642c61275c5a3
diff --git a/adb/transport.cpp b/adb/transport.cpp
index b7f30ea..5c50c0a 100644
--- a/adb/transport.cpp
+++ b/adb/transport.cpp
@@ -748,7 +748,7 @@
int ambiguous = 0;
retry:
- if (error_out) *error_out = "device not found";
+ if (error_out) *error_out = android::base::StringPrintf("device '%s' not found", serial);
adb_mutex_lock(&transport_lock);
for (t = transport_list.next; t != &transport_list; t = t->next) {