summaryrefslogtreecommitdiffstats
path: root/adb/adb_io.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-05-01 17:04:38 -0700
committerElliott Hughes <enh@google.com>2015-05-01 17:37:28 -0700
commite1a55004e9fa46055c59f86e952e9e457c36c3f2 (patch)
tree7641d408bf403954720299492240fb4690674214 /adb/adb_io.h
parent92af733ee202caa3b5475fe27fcc81582f11e7c8 (diff)
downloadsystem_core-e1a55004e9fa46055c59f86e952e9e457c36c3f2.zip
system_core-e1a55004e9fa46055c59f86e952e9e457c36c3f2.tar.gz
system_core-e1a55004e9fa46055c59f86e952e9e457c36c3f2.tar.bz2
Add WriteFdFmt and clean up more code.
Also say *which* device wasn't found. Bug: http://b/20666660 Change-Id: I50e234ad89e39ae0a8995083c0b642c61275c5a3 (cherry picked from commit ab52c181fa4c1c9891644635dc5653cda5b90e2b)
Diffstat (limited to 'adb/adb_io.h')
-rw-r--r--adb/adb_io.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/adb_io.h b/adb/adb_io.h
index 3b8b050..8d50a6d 100644
--- a/adb/adb_io.h
+++ b/adb/adb_io.h
@@ -49,11 +49,11 @@ bool ReadFdExactly(int fd, void *buf, size_t len);
*/
bool WriteFdExactly(int fd, const void* buf, size_t len);
-/* Same as above, but with an implicit len = strlen(buf). */
+// Same as above, but for strings.
bool WriteFdExactly(int fd, const char* s);
bool WriteFdExactly(int fd, const std::string& s);
-// TODO: move minadb off this and remove it.
-bool WriteStringFully(int fd, const char* str);
+// Same as above, but formats the string to send.
+bool WriteFdFmt(int fd, const char* fmt, ...) __attribute__((__format__(__printf__, 2, 3)));
#endif /* ADB_IO_H */