summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-11-03 00:07:18 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-11-03 00:07:18 +0000
commitd09dc85d63cc61b28fa06e9f59949447b4a7f336 (patch)
tree8e054bfd8ed444a950ce8aa2391ae2e791711d7a /fastboot/fastboot.cpp
parenta2a6b0bfa91039fa7cc95c585e81ab34220617f2 (diff)
parent9eab7875602dec9910002f080df513077f56a2dd (diff)
Merge "Work around an angler bootloader bug."
am: 9eab787560 * commit '9eab7875602dec9910002f080df513077f56a2dd': Work around an angler bootloader bug.
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r--fastboot/fastboot.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 651492061..3b25a8296 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -44,6 +44,7 @@
#include <unistd.h>
#include <base/parseint.h>
+#include <base/strings.h>
#include <sparse/sparse.h>
#include <ziparchive/zip_archive.h>
@@ -580,6 +581,9 @@ static int64_t get_target_sparse_limit(usb_handle* usb) {
return 0;
}
+ // Some bootloaders (angler, for example) send spurious whitespace too.
+ max_download_size = android::base::Trim(max_download_size);
+
uint64_t limit;
if (!android::base::ParseUint(max_download_size.c_str(), &limit)) {
fprintf(stderr, "couldn't parse max-download-size '%s'\n", max_download_size.c_str());