Lines Matching refs:size

114   if (lines.size() != 2) {  in ParseLastCommandFile()
195 static bool discard_blocks(int fd, off64_t offset, uint64_t size, bool force = false) { in discard_blocks() argument
201 uint64_t args[2] = { static_cast<uint64_t>(offset), size }; in discard_blocks()
223 static void allocate(size_t size, std::vector<uint8_t>* buffer) { in allocate() argument
225 if (size <= buffer->size()) return; in allocate()
226 buffer->resize(size); in allocate()
241 CHECK_NE(tgt.size(), static_cast<size_t>(0)); in RangeSinkWriter()
245 return next_range_ == tgt_.size() && current_range_left_ == 0; in Finished()
253 size_t Write(const uint8_t* data, size_t size) { in Write() argument
255 LOG(ERROR) << "range sink write overrun; can't write " << size << " bytes"; in Write()
260 while (size > 0) { in Write()
266 size_t write_now = size; in Write()
278 size -= write_now; in Write()
301 if (next_range_ >= tgt_.size()) { in SeekToOutputRange()
362 static bool receive_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_new_data() argument
365 while (size > 0) { in receive_new_data()
380 size_t write_now = std::min(size, nti->writer->AvailableSpace()); in receive_new_data()
387 size -= write_now; in receive_new_data()
402 static bool receive_brotli_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_brotli_new_data() argument
405 while (size > 0 || BrotliDecoderHasMoreOutput(nti->brotli_decoder_state)) { in receive_brotli_new_data()
427 size_t available_in = size; in receive_brotli_new_data()
442 << size - available_in << ", decoder status " << result; in receive_brotli_new_data()
451 size = available_in; in receive_brotli_new_data()
489 size_t size = (end - begin) * BLOCKSIZE; in ReadBlocks() local
490 if (!android::base::ReadFully(fd, buffer->data() + p, size)) { in ReadBlocks()
492 PLOG(ERROR) << "Failed to read " << size << " bytes of data"; in ReadBlocks()
496 p += size; in ReadBlocks()
506 size_t size = (end - begin) * BLOCKSIZE; in WriteBlocks() local
507 if (!discard_blocks(fd, offset, size)) { in WriteBlocks()
515 if (!android::base::WriteFully(fd, buffer.data() + written, size)) { in WriteBlocks()
517 PLOG(ERROR) << "Failed to write " << size << " bytes of data"; in WriteBlocks()
521 written += size; in WriteBlocks()
565 if (params.tokens.size() < 5) { in PrintHashForCorruptedSourceBlocks()
572 if (params.tokens.size() < 8) { in PrintHashForCorruptedSourceBlocks()
593 if (pos == params.tokens.size()) { in PrintHashForCorruptedSourceBlocks()
608 CHECK_LE((buffer_index + 1) * BLOCKSIZE, buffer.size()); in PrintHashForCorruptedSourceBlocks()
623 CHECK_EQ(src.blocks() * BLOCKSIZE, buffer.size()); in PrintHashForCorruptedStashedBlocks()
1020 if (params.cpos >= params.tokens.size()) { in LoadSourceBlocks()
1031 while (params.cpos < params.tokens.size()) { in LoadSourceBlocks()
1035 if (tokens.size() != 2) { in LoadSourceBlocks()
1086 if (params.cpos >= params.tokens.size()) { in LoadSrcTgtVersion3()
1097 if (params.cpos >= params.tokens.size()) { in LoadSrcTgtVersion3()
1106 if (params.cpos + 2 >= params.tokens.size()) { in LoadSrcTgtVersion3()
1215 if (params.cpos + 1 >= params.tokens.size()) { in PerformCommandStash()
1260 if (params.cpos >= params.tokens.size()) { in PerformCommandFree()
1276 if (params.cpos >= params.tokens.size()) { in PerformCommandZero()
1292 size_t size = (end - begin) * BLOCKSIZE; in PerformCommandZero() local
1293 if (!discard_blocks(params.fd, offset, size)) { in PerformCommandZero()
1321 if (params.cpos >= params.tokens.size()) { in PerformCommandNew()
1356 if (params.cpos + 1 >= params.tokens.size()) { in PerformCommandDiff()
1457 if (params.cpos >= params.tokens.size()) { in PerformCommandErase()
1470 size_t size = (end - begin) * BLOCKSIZE; in PerformCommandErase() local
1471 if (!discard_blocks(params.fd, offset, size, true /* force */)) { in PerformCommandErase()
1494 if (params.cpos + 5 != params.tokens.size()) { in PerformCommandComputeHashTree()
1501 if (!hash_tree_ranges || hash_tree_ranges.size() != 1) { in PerformCommandComputeHashTree()
1603 SHA1(reinterpret_cast<const uint8_t*>(dm_target_name.data()), dm_target_name.size(), digest); in Sha1DevicePath()
1622 SHA1(reinterpret_cast<const uint8_t*>(path.data()), path.size(), digest); in Sha1DevicePath()
1638 if (argv.size() != 4) { in PerformBlockImageUpdate()
1640 argv.size()); in PerformBlockImageUpdate()
1739 if (lines.size() < kTransferListHeaderLines) { in PerformBlockImageUpdate()
1741 lines.size()); in PerformBlockImageUpdate()
1826 for (size_t i = kTransferListHeaderLines; i < lines.size(); i++) { in PerformBlockImageUpdate()
1921 LOG(INFO) << "max alloc needed was " << params.buffer.size(); in PerformBlockImageUpdate()
2041 CHECK_EQ(static_cast<size_t>(Command::Type::LAST), command_map.size()); in BlockImageVerifyFn()
2063 CHECK_EQ(static_cast<size_t>(Command::Type::LAST), command_map.size()); in BlockImageUpdateFn()
2069 if (argv.size() != 2) { in RangeSha1Fn()
2070 ErrorAbort(state, kArgsParsingFailure, "range_sha1 expects 2 arguments, got %zu", argv.size()); in RangeSha1Fn()
2144 if (argv.size() != 1) { in CheckFirstBlockFn()
2146 argv.size()); in CheckFirstBlockFn()
2209 if (argv.size() != 2) { in BlockImageRecoverFn()
2211 argv.size()); in BlockImageRecoverFn()