Lines Matching refs:size

67     file->size = file->st.st_size;
68 file->data = malloc(file->size);
78 ssize_t bytes_read = fread(file->data, 1, file->size, f);
79 if (bytes_read != file->size) {
81 filename, (long)bytes_read, (long)file->size);
88 SHA_hash(file->data, file->size, file->sha1);
112 // sha1 hash will be loaded. It is acceptable for a size value to be
153 int pairs = (colons-1)/2; // # of (size,sha1) pairs in filename
155 size_t* size = malloc(pairs * sizeof(size_t));
160 size[i] = strtol(size_str, NULL, 10);
161 if (size[i] == 0) {
162 printf("LoadPartitionContents called with bad size (%s)\n", filename);
170 // increasing size.
171 size_array = size;
212 // allocate enough memory to hold the largest size.
213 file->data = malloc(size[index[pairs-1]]);
215 file->size = 0; // # bytes read so far
218 // Read enough additional bytes to get us up to the next size
220 // size).
221 size_t next = size[index[i]] - file->size;
241 file->size += read;
261 printf("partition read matched size %zu sha %s\n",
262 size[index[i]], sha1sum[index[i]]);
281 // Ran off the end of the list of (size,sha1) pairs without
302 free(size);
319 ssize_t bytes_written = FileSink(file->data, file->size, &fd);
320 if (bytes_written != file->size) {
322 filename, (long)bytes_written, (long)file->size,
640 ssize_t size;
646 if (msi->size - msi->pos < len) {
847 if (MakeFreeSpaceOnCache(source_file->size) < 0) {
889 if (MakeFreeSpaceOnCache(source_file->size) < 0) {
934 msi.size = target_size;
955 ssize_t header_bytes_read = patch->size;
963 result = ApplyBSDiffPatch(source_to_use->data, source_to_use->size,
967 result = ApplyImagePatch(source_to_use->data, source_to_use->size,