diff options
author | Connor O'Brien <connoro@google.com> | 2017-11-03 21:15:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-11-03 21:15:34 +0000 |
commit | ebcfa449375fb809b266383d0036a7be3ecdac01 (patch) | |
tree | 4bd9a3a0401f6dc324ac9b903137210cc98ad605 /fastboot/fastboot.cpp | |
parent | 525205508f3f4b48fc9ce4dd5c4df0d00af655aa (diff) | |
parent | 6ef5c24b84252bd601b99c31f1de5dafdb91a66e (diff) |
Merge "fastboot: handle small flash block sizes correctly"
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r-- | fastboot/fastboot.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index df755aabb..40c18e002 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -1365,9 +1365,8 @@ static unsigned fb_get_flash_block_size(Transport* transport, std::string name) fprintf(stderr, "Couldn't parse %s '%s'.\n", name.c_str(), sizeString.c_str()); return 0; } - if (size < 4096 || (size & (size - 1)) != 0) { - fprintf(stderr, "Invalid %s %u: must be a power of 2 and at least 4096.\n", - name.c_str(), size); + if ((size & (size - 1)) != 0) { + fprintf(stderr, "Invalid %s %u: must be a power of 2.\n", name.c_str(), size); return 0; } return size; |