Loading fastboot/fastboot_driver.cpp +3 −3 Original line number Original line Diff line number Diff line Loading @@ -220,10 +220,10 @@ RetCode FastBootDriver::Download(const char* buf, uint32_t size, std::string* re return HandleResponse(response, info); return HandleResponse(response, info); } } RetCode FastBootDriver::Download(sparse_file* s, std::string* response, RetCode FastBootDriver::Download(sparse_file* s, bool use_crc, std::string* response, std::vector<std::string>* info) { std::vector<std::string>* info) { error_ = ""; error_ = ""; int64_t size = sparse_file_len(s, true, false); int64_t size = sparse_file_len(s, true, use_crc); if (size <= 0 || size > MAX_DOWNLOAD_SIZE) { if (size <= 0 || size > MAX_DOWNLOAD_SIZE) { error_ = "Sparse file is too large or invalid"; error_ = "Sparse file is too large or invalid"; return BAD_ARG; return BAD_ARG; Loading @@ -247,7 +247,7 @@ RetCode FastBootDriver::Download(sparse_file* s, std::string* response, return data->self->SparseWriteCallback(data->tpbuf, cbuf, len); return data->self->SparseWriteCallback(data->tpbuf, cbuf, len); }; }; if (sparse_file_callback(s, true, false, cb, &cb_priv) < 0) { if (sparse_file_callback(s, true, use_crc, cb, &cb_priv) < 0) { error_ = "Error reading sparse file"; error_ = "Error reading sparse file"; return IO_ERROR; return IO_ERROR; } } Loading fastboot/fastboot_driver.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -74,7 +74,7 @@ class FastBootDriver { // This will be removed after fastboot is modified to use a vector // This will be removed after fastboot is modified to use a vector RetCode Download(const char* buf, uint32_t size, std::string* response = nullptr, RetCode Download(const char* buf, uint32_t size, std::string* response = nullptr, std::vector<std::string>* info = nullptr); std::vector<std::string>* info = nullptr); RetCode Download(sparse_file* s, std::string* response = nullptr, RetCode Download(sparse_file* s, bool use_crc = false, std::string* response = nullptr, std::vector<std::string>* info = nullptr); std::vector<std::string>* info = nullptr); RetCode Erase(const std::string& part, std::string* response = nullptr, RetCode Erase(const std::string& part, std::string* response = nullptr, std::vector<std::string>* info = nullptr); std::vector<std::string>* info = nullptr); Loading Loading
fastboot/fastboot_driver.cpp +3 −3 Original line number Original line Diff line number Diff line Loading @@ -220,10 +220,10 @@ RetCode FastBootDriver::Download(const char* buf, uint32_t size, std::string* re return HandleResponse(response, info); return HandleResponse(response, info); } } RetCode FastBootDriver::Download(sparse_file* s, std::string* response, RetCode FastBootDriver::Download(sparse_file* s, bool use_crc, std::string* response, std::vector<std::string>* info) { std::vector<std::string>* info) { error_ = ""; error_ = ""; int64_t size = sparse_file_len(s, true, false); int64_t size = sparse_file_len(s, true, use_crc); if (size <= 0 || size > MAX_DOWNLOAD_SIZE) { if (size <= 0 || size > MAX_DOWNLOAD_SIZE) { error_ = "Sparse file is too large or invalid"; error_ = "Sparse file is too large or invalid"; return BAD_ARG; return BAD_ARG; Loading @@ -247,7 +247,7 @@ RetCode FastBootDriver::Download(sparse_file* s, std::string* response, return data->self->SparseWriteCallback(data->tpbuf, cbuf, len); return data->self->SparseWriteCallback(data->tpbuf, cbuf, len); }; }; if (sparse_file_callback(s, true, false, cb, &cb_priv) < 0) { if (sparse_file_callback(s, true, use_crc, cb, &cb_priv) < 0) { error_ = "Error reading sparse file"; error_ = "Error reading sparse file"; return IO_ERROR; return IO_ERROR; } } Loading
fastboot/fastboot_driver.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -74,7 +74,7 @@ class FastBootDriver { // This will be removed after fastboot is modified to use a vector // This will be removed after fastboot is modified to use a vector RetCode Download(const char* buf, uint32_t size, std::string* response = nullptr, RetCode Download(const char* buf, uint32_t size, std::string* response = nullptr, std::vector<std::string>* info = nullptr); std::vector<std::string>* info = nullptr); RetCode Download(sparse_file* s, std::string* response = nullptr, RetCode Download(sparse_file* s, bool use_crc = false, std::string* response = nullptr, std::vector<std::string>* info = nullptr); std::vector<std::string>* info = nullptr); RetCode Erase(const std::string& part, std::string* response = nullptr, RetCode Erase(const std::string& part, std::string* response = nullptr, std::vector<std::string>* info = nullptr); std::vector<std::string>* info = nullptr); Loading