Lines Matching refs:data
114 static int read_all(int fd, uint8_t* data, size_t size) { in read_all() argument
117 ssize_t r = TEMP_FAILURE_RETRY(read(fd, data+so_far, size-so_far)); in read_all()
127 static int write_all(int fd, const uint8_t* data, size_t size) { in write_all() argument
130 ssize_t w = TEMP_FAILURE_RETRY(write(fd, data+written, size-written)); in write_all()
176 static ssize_t RangeSinkWrite(const uint8_t* data, ssize_t size, void* token) { in RangeSinkWrite() argument
192 if (write_all(rss->fd, data, write_now) == -1) { in RangeSinkWrite()
196 data += write_now; in RangeSinkWrite()
255 static bool receive_new_data(const unsigned char* data, int size, void* cookie) { in receive_new_data() argument
269 ssize_t written = RangeSinkWrite(data, size, nti->rss); in receive_new_data()
270 data += written; in receive_new_data()
445 static void EnumerateStash(const char* dirname, StashCallback callback, void* data) { in EnumerateStash() argument
486 callback(fn, data); in EnumerateStash()
495 static void UpdateFileSize(const char* fn, void* data) { in UpdateFileSize() argument
496 int* size = (int*) data; in UpdateFileSize()
499 if (!fn || !data) { in UpdateFileSize()
515 static void DeleteFile(const char* fn, void* data) { in DeleteFile() argument
525 static void DeletePartial(const char* fn, void* data) { in DeletePartial() argument
527 DeleteFile(fn, data); in DeletePartial()
1375 patch_value.data = (char*) (params->patch_start + offset); in PerformCommandDiff()
1588 patch_entry = mzFindZipEntry(za, patch_data_fn->data); in PerformBlockImageUpdate()
1591 fprintf(stderr, "%s(): no file \"%s\" in package", name, patch_data_fn->data); in PerformBlockImageUpdate()
1596 new_entry = mzFindZipEntry(za, new_data_fn->data); in PerformBlockImageUpdate()
1599 fprintf(stderr, "%s(): no file \"%s\" in package", name, new_data_fn->data); in PerformBlockImageUpdate()
1603 params.fd = TEMP_FAILURE_RETRY(open(blockdev_filename->data, O_RDWR)); in PerformBlockImageUpdate()
1606 fprintf(stderr, "open \"%s\" failed: %s\n", blockdev_filename->data, strerror(errno)); in PerformBlockImageUpdate()
1636 memcpy(transfer_list, transfer_list_value->data, transfer_list_value->size); in PerformBlockImageUpdate()
1677 res = CreateStash(state, stash_max_blocks, blockdev_filename->data, in PerformBlockImageUpdate()
1906 int fd = open(blockdev_filename->data, O_RDWR); in RangeSha1Fn()
1908 ErrorAbort(state, "open \"%s\" failed: %s", blockdev_filename->data, strerror(errno)); in RangeSha1Fn()
1912 RangeSet* rs = parse_range(ranges->data); in RangeSha1Fn()
1921 ErrorAbort(state, "failed to seek %s: %s", blockdev_filename->data, in RangeSha1Fn()
1928 ErrorAbort(state, "failed to read %s: %s", blockdev_filename->data, in RangeSha1Fn()