Lines Matching refs:buffer
82 std::vector<unsigned char> buffer(partition.size); in ReadPartitionToBuffer() local
83 if (!android::base::ReadFully(dev, buffer.data(), buffer.size())) { in ReadPartitionToBuffer()
84 PLOG(ERROR) << "Failed to read " << buffer.size() << " bytes of data for partition " in ReadPartitionToBuffer()
87 SHA1(buffer.data(), buffer.size(), out->sha1); in ReadPartitionToBuffer()
89 out->data = std::move(buffer); in ReadPartitionToBuffer()
189 unsigned char buffer[4096]; in WriteBufferToPartition() local
191 for (size_t p = 0; p < len; p += sizeof(buffer)) { in WriteBufferToPartition()
193 if (to_read > sizeof(buffer)) { in WriteBufferToPartition()
194 to_read = sizeof(buffer); in WriteBufferToPartition()
197 if (!android::base::ReadFully(fd, buffer, to_read)) { in WriteBufferToPartition()
202 if (memcmp(buffer, data + p, to_read) != 0) { in WriteBufferToPartition()