Lines Matching refs:size

70   size_t bytes_read = ota_fread(data.data(), 1, data.size(), f.get());  in LoadFileContents()
71 if (bytes_read != data.size()) { in LoadFileContents()
72 printf("short read of \"%s\" (%zu bytes of %zu)\n", filename, bytes_read, data.size()); in LoadFileContents()
76 SHA1(file->data.data(), file->data.size(), file->sha1); in LoadFileContents()
96 if (pieces.size() < 4 || pieces.size() % 2 != 0 || pieces[0] != "EMMC") { in LoadPartitionContents()
101 size_t pair_count = (pieces.size() - 2) / 2; // # of (size, sha1) pairs in filename in LoadPartitionContents()
104 size_t size; in LoadPartitionContents() local
105 if (!android::base::ParseUint(pieces[i * 2 + 2], &size) || size == 0) { in LoadPartitionContents()
109 pairs.push_back({ size, pieces[i * 2 + 3] }); in LoadPartitionContents()
197 ssize_t bytes_written = FileSink(file->data.data(), file->data.size(), &fd); in SaveFileContents()
198 if (bytes_written != static_cast<ssize_t>(file->data.size())) { in SaveFileContents()
200 file->data.size(), strerror(errno)); in SaveFileContents()
230 if (pieces.size() < 2 || pieces[0] != "EMMC") { in WriteToPartition()
389 for (size_t i = 0; i < patch_sha1_str.size(); ++i) { in FindMatchingPatch()
582 if (pieces.size() != 2 || pieces[0] != "EMMC") { in applypatch_flash()
626 size_t header_bytes_read = patch->data.size(); in GenerateTarget()
640 if (MakeFreeSpaceOnCache(source_file.data.size()) < 0) { in GenerateTarget()
659 result = ApplyBSDiffPatch(source_file.data.data(), source_file.data.size(), patch.get(), 0, in GenerateTarget()
662 result = ApplyImagePatch(source_file.data.data(), source_file.data.size(), patch.get(), sink, in GenerateTarget()
682 memory_sink_str.size(), target_filename) != 0) { in GenerateTarget()