summaryrefslogtreecommitdiffstats
path: root/adb/adb_io.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add WriteFdFmt and clean up more code.Elliott Hughes2015-05-011-6/+13
| | | | | | | | Also say *which* device wasn't found. Bug: http://b/20666660 Change-Id: I50e234ad89e39ae0a8995083c0b642c61275c5a3 (cherry picked from commit ab52c181fa4c1c9891644635dc5653cda5b90e2b)
* More adb buffer fixes.Elliott Hughes2015-05-011-7/+28
| | | | | | | | | | | | | | This patch factors out a lot of the basic protocol code: sending OKAY, sending FAIL, and sending a length-prefixed string. ADB_TRACE has been non-optional for a long time, so let's just remove the #ifs. Also actually build the device tracker test tool (and remove its duplicate). Bug: http://b/20666660 Change-Id: I6c7d59f18707bdc62ca69dea45547617f9f31fc6 (cherry picked from commit e67f1f87d9b1188ec8617035db7006c37ee7b21e)
* Merge "The generic failure case disappeared..."Dan Albert2015-03-201-0/+2
|\
| * The generic failure case disappeared...Dan Albert2015-03-191-0/+2
| | | | | | | | | | | | | | Was manifesting as a write to a full disk hanging indefinitely. Bug: 19846181 Change-Id: Ia581e0bbbb331c221bdb68882c238d0cb9f8a0b3
* | File header cleanup.Dan Albert2015-03-191-1/+1
|/ | | | | | | | | * sysdeps.h should always be included first. * TRACE_TAG needs to be defined before anything is included. * Some files were missing copyright headers. * Save precious bytes on my SSD by removing useless whitespace. Change-Id: I88980e6e00b5be1093806cf286740d9e4a033b94
* Move adb to C++.Dan Albert2015-03-091-2/+2
| | | | | | | | | | | | | | | | | I keep trying to clean things up and needing std::strings. Might as well just do this now. usb_linux_client.c is going to stay as C because GCC isn't smart enough to deal with the designated initializers it uses (though for some reason it is in C mode). The Darwin files are staying as C because I don't have a way to test that they build. The Windows files are staying as C because while I can actually build for them, it's slow and painful. Change-Id: I75367d29205a9049d34460032b3bb36384f43941
* Test readx/writex (now renamed).Dan Albert2015-02-251-0/+93
Renamed readx/writex to ReadFdExactly/WriteFdExactly respectively. These read/write a full fixed-size buffer. If the whole buffer cannot be read/written, these functions return an error. Rename write_string to WriteStringFully. Move the TEMP_FAILURE_RETRY definition in sysdeps.h out of the !Windows section. It seems Windows won't actually interrupt a call, but it's easier to just define it than to #ifdef each call. Change-Id: Ia8ddffa2a52764a2f9a281c96c937660e002b9b9