Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3ea99dd authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Work around an angler bootloader bug." am: 9eab7875

am: d09dc85d

* commit 'd09dc85d':
  Work around an angler bootloader bug.
parents 0ec5ce62 d09dc85d
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -44,6 +44,7 @@
#include <unistd.h>
#include <unistd.h>


#include <base/parseint.h>
#include <base/parseint.h>
#include <base/strings.h>
#include <sparse/sparse.h>
#include <sparse/sparse.h>
#include <ziparchive/zip_archive.h>
#include <ziparchive/zip_archive.h>


@@ -580,6 +581,9 @@ static int64_t get_target_sparse_limit(usb_handle* usb) {
        return 0;
        return 0;
    }
    }


    // Some bootloaders (angler, for example) send spurious whitespace too.
    max_download_size = android::base::Trim(max_download_size);

    uint64_t limit;
    uint64_t limit;
    if (!android::base::ParseUint(max_download_size.c_str(), &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());
        fprintf(stderr, "couldn't parse max-download-size '%s'\n", max_download_size.c_str());