Loading fastboot/device/variables.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& ar bool is_zero_length; if (LogicalPartitionExists(args[0], device->GetCurrentSlot(), &is_zero_length) && is_zero_length) { *message = "0"; *message = "0x0"; return true; } // Otherwise, open the partition as normal. Loading fastboot/fuzzy_fastboot/main.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ #include <thread> #include <vector> #include <android-base/parseint.h> #include <android-base/stringprintf.h> #include <gtest/gtest.h> #include <sparse/sparse.h> Loading Loading @@ -331,8 +332,9 @@ TEST_F(Conformance, PartitionInfo) { << cmd + " responded with a string with leading whitespace"; EXPECT_FALSE(resp.compare(0, 2, "0x")) << cmd + "responded with a string that does not start with 0x..."; int64_t size = strtoll(resp.c_str(), nullptr, 16); EXPECT_GT(size, 0) << "'" + resp + "' is not a valid response from " + cmd; uint64_t size; ASSERT_TRUE(android::base::ParseUint(resp, &size)) << "'" + resp + "' is not a valid response from " + cmd; } } Loading Loading
fastboot/device/variables.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& ar bool is_zero_length; if (LogicalPartitionExists(args[0], device->GetCurrentSlot(), &is_zero_length) && is_zero_length) { *message = "0"; *message = "0x0"; return true; } // Otherwise, open the partition as normal. Loading
fastboot/fuzzy_fastboot/main.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ #include <thread> #include <vector> #include <android-base/parseint.h> #include <android-base/stringprintf.h> #include <gtest/gtest.h> #include <sparse/sparse.h> Loading Loading @@ -331,8 +332,9 @@ TEST_F(Conformance, PartitionInfo) { << cmd + " responded with a string with leading whitespace"; EXPECT_FALSE(resp.compare(0, 2, "0x")) << cmd + "responded with a string that does not start with 0x..."; int64_t size = strtoll(resp.c_str(), nullptr, 16); EXPECT_GT(size, 0) << "'" + resp + "' is not a valid response from " + cmd; uint64_t size; ASSERT_TRUE(android::base::ParseUint(resp, &size)) << "'" + resp + "' is not a valid response from " + cmd; } } Loading