• Home
  • Raw
  • Download

Lines Matching refs:data

74 static int read_all(int fd, uint8_t* data, size_t size) {  in read_all()  argument
77 ssize_t r = TEMP_FAILURE_RETRY(ota_read(fd, data+so_far, size-so_far)); in read_all()
93 return read_all(fd, buffer.data(), size); in read_all()
96 static int write_all(int fd, const uint8_t* data, size_t size) { in write_all() argument
99 ssize_t w = TEMP_FAILURE_RETRY(ota_write(fd, data+written, size-written)); in write_all()
112 return write_all(fd, buffer.data(), size); in write_all()
170 size_t Write(const uint8_t* data, size_t size) { in Write() argument
188 if (write_all(fd_, data, write_now) == -1) { in Write()
192 data += write_now; in Write()
277 static bool receive_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_new_data() argument
291 if (nti->writer->Write(data, write_now) != write_now) { in receive_new_data()
296 data += write_now; in receive_new_data()
312 static bool receive_brotli_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_brotli_new_data() argument
338 nti->brotli_decoder_state, &available_in, &data, &available_out, &next_out, nullptr); in receive_brotli_new_data()
395 if (read_all(fd, buffer.data() + p, size) == -1) { in ReadBlocks()
418 if (write_all(fd, buffer.data() + written, size) == -1) { in WriteBlocks()
507 SHA1(buffer.data() + buffer_index * BLOCKSIZE, BLOCKSIZE, digest); in PrintHashForCorruptedSourceBlocks()
525 SHA1(buffer.data() + i * BLOCKSIZE, BLOCKSIZE, digest); in PrintHashForCorruptedStashedBlocks()
552 const uint8_t* data = buffer.data(); in VerifyBlocks() local
554 SHA1(data, blocks * BLOCKSIZE, digest); in VerifyBlocks()
797 SHA1(reinterpret_cast<const uint8_t*>(blockdev.data()), blockdev.size(), digest); in CreateStash()
881 const uint8_t* from = source.data(); in MoveRange()
882 uint8_t* to = dest.data(); in MoveRange()
1193 memset(params.buffer.data(), 0, BLOCKSIZE); in PerformCommandZero()
1300 if (ApplyImagePatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value, in PerformCommandDiff()
1309 if (ApplyBSDiffPatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value, 0, in PerformCommandDiff()
1452 ZipString path_data(patch_data_fn->data.c_str()); in PerformBlockImageUpdate()
1455 LOG(ERROR) << name << "(): no file \"" << patch_data_fn->data << "\" in package"; in PerformBlockImageUpdate()
1460 ZipString new_data(new_data_fn->data.c_str()); in PerformBlockImageUpdate()
1463 LOG(ERROR) << name << "(): no file \"" << new_data_fn->data << "\" in package"; in PerformBlockImageUpdate()
1467 params.fd.reset(TEMP_FAILURE_RETRY(ota_open(blockdev_filename->data.c_str(), O_RDWR))); in PerformBlockImageUpdate()
1469 PLOG(ERROR) << "open \"" << blockdev_filename->data << "\" failed"; in PerformBlockImageUpdate()
1476 params.nti.brotli_compressed = android::base::EndsWith(new_data_fn->data, ".br"); in PerformBlockImageUpdate()
1496 std::vector<std::string> lines = android::base::Split(transfer_list_value->data, "\n"); in PerformBlockImageUpdate()
1540 int res = CreateStash(state, stash_max_blocks, blockdev_filename->data, params.stashbase); in PerformBlockImageUpdate()
1601 const char* partition = strrchr(blockdev_filename->data.c_str(), '/'); in PerformBlockImageUpdate()
1743 android::base::unique_fd fd(ota_open(blockdev_filename->data.c_str(), O_RDWR)); in RangeSha1Fn()
1745 ErrorAbort(state, kFileOpenFailure, "open \"%s\" failed: %s", blockdev_filename->data.c_str(), in RangeSha1Fn()
1750 RangeSet rs = RangeSet::Parse(ranges->data); in RangeSha1Fn()
1758 ErrorAbort(state, kLseekFailure, "failed to seek %s: %s", blockdev_filename->data.c_str(), in RangeSha1Fn()
1765 ErrorAbort(state, kFreadFailure, "failed to read %s: %s", blockdev_filename->data.c_str(), in RangeSha1Fn()
1770 SHA1_Update(&ctx, buffer.data(), BLOCKSIZE); in RangeSha1Fn()
1804 android::base::unique_fd fd(ota_open(arg_filename->data.c_str(), O_RDONLY)); in CheckFirstBlockFn()
1806 ErrorAbort(state, kFileOpenFailure, "open \"%s\" failed: %s", arg_filename->data.c_str(), in CheckFirstBlockFn()
1815 ErrorAbort(state, kFreadFailure, "failed to read %s: %s", arg_filename->data.c_str(), in CheckFirstBlockFn()
1864 LOG(INFO) << filename->data << " image corrupted, attempting to recover..."; in BlockImageRecoverFn()
1867 fec::io fh(filename->data, O_RDWR); in BlockImageRecoverFn()
1870 ErrorAbort(state, kLibfecFailure, "fec_open \"%s\" failed: %s", filename->data.c_str(), in BlockImageRecoverFn()
1887 for (const auto& range : RangeSet::Parse(ranges->data)) { in BlockImageRecoverFn()
1896 filename->data.c_str(), j, strerror(errno)); in BlockImageRecoverFn()
1912 LOG(INFO) << "..." << filename->data << " image recovered successfully."; in BlockImageRecoverFn()