Lines Matching refs:len
47 static size_t FileSink(const unsigned char* data, size_t len, int fd);
218 int WriteToPartition(const unsigned char* data, size_t len, const std::string& target) { in WriteToPartition() argument
239 while (start < len) { in WriteToPartition()
240 size_t to_write = len - start; in WriteToPartition()
284 start = len; in WriteToPartition()
285 for (size_t p = 0; p < len; p += sizeof(buffer)) { in WriteToPartition()
286 size_t to_read = len - p; in WriteToPartition()
314 if (start == len) { in WriteToPartition()
424 static size_t FileSink(const unsigned char* data, size_t len, int fd) { in FileSink() argument
426 while (done < len) { in FileSink()
427 ssize_t wrote = TEMP_FAILURE_RETRY(ota_write(fd, data + done, len - done)); in FileSink()
429 printf("error writing %zd bytes: %s\n", (len - done), strerror(errno)); in FileSink()
630 SinkFn sink = [&memory_sink_str](const unsigned char* data, size_t len) { in GenerateTarget() argument
631 memory_sink_str.append(reinterpret_cast<const char*>(data), len); in GenerateTarget()
632 return len; in GenerateTarget()