Lines Matching refs:ret
105 int ret; in process_raw_chunk() local
117 ret = sparse_file_add_fd(s, fd, offset, len, block); in process_raw_chunk()
118 if (ret < 0) { in process_raw_chunk()
119 return ret; in process_raw_chunk()
125 ret = read_all(fd, copybuf, chunk); in process_raw_chunk()
126 if (ret < 0) { in process_raw_chunk()
127 return ret; in process_raw_chunk()
142 int ret; in process_fill_chunk() local
153 ret = read_all(fd, &fill_val, sizeof(fill_val)); in process_fill_chunk()
154 if (ret < 0) { in process_fill_chunk()
155 return ret; in process_fill_chunk()
158 ret = sparse_file_add_fill(s, fill_val, len, block); in process_fill_chunk()
159 if (ret < 0) { in process_fill_chunk()
160 return ret; in process_fill_chunk()
205 int ret; in process_crc32_chunk() local
211 ret = read_all(fd, &file_crc32, sizeof(file_crc32)); in process_crc32_chunk()
212 if (ret < 0) { in process_crc32_chunk()
213 return ret; in process_crc32_chunk()
227 int ret; in process_chunk() local
234 ret = process_raw_chunk(s, chunk_data_size, fd, offset, in process_chunk()
236 if (ret < 0) { in process_chunk()
237 verbose_error(s->verbose, ret, "data block at %" PRId64, offset); in process_chunk()
238 return ret; in process_chunk()
242 ret = process_fill_chunk(s, chunk_data_size, fd, in process_chunk()
244 if (ret < 0) { in process_chunk()
245 verbose_error(s->verbose, ret, "fill block at %" PRId64, offset); in process_chunk()
246 return ret; in process_chunk()
250 ret = process_skip_chunk(s, chunk_data_size, fd, in process_chunk()
253 if (ret < 0) { in process_chunk()
254 verbose_error(s->verbose, ret, "skip block at %" PRId64, offset); in process_chunk()
255 return ret; in process_chunk()
260 ret = process_crc32_chunk(fd, chunk_data_size, crc_ptr); in process_chunk()
261 if (ret < 0) { in process_chunk()
264 return ret; in process_chunk()
277 int ret; in sparse_file_read_sparse() local
298 ret = read_all(fd, &sparse_header, sizeof(sparse_header)); in sparse_file_read_sparse()
299 if (ret < 0) { in sparse_file_read_sparse()
300 return ret; in sparse_file_read_sparse()
327 ret = read_all(fd, &chunk_header, sizeof(chunk_header)); in sparse_file_read_sparse()
328 if (ret < 0) { in sparse_file_read_sparse()
329 return ret; in sparse_file_read_sparse()
341 ret = process_chunk(s, fd, offset, sparse_header.chunk_hdr_sz, &chunk_header, in sparse_file_read_sparse()
343 if (ret < 0) { in sparse_file_read_sparse()
344 return ret; in sparse_file_read_sparse()
347 cur_block += ret; in sparse_file_read_sparse()
359 int ret; in sparse_file_read_normal() local
374 ret = read_all(fd, buf, to_read); in sparse_file_read_normal()
375 if (ret < 0) { in sparse_file_read_normal()
378 return ret; in sparse_file_read_normal()
424 int ret; in sparse_file_import() local
429 ret = read_all(fd, &sparse_header, sizeof(sparse_header)); in sparse_file_import()
430 if (ret < 0) { in sparse_file_import()
431 verbose_error(verbose, ret, "header"); in sparse_file_import()
460 ret = lseek64(fd, 0, SEEK_SET); in sparse_file_import()
461 if (ret < 0) { in sparse_file_import()
462 verbose_error(verbose, ret, "seeking"); in sparse_file_import()
469 ret = sparse_file_read(s, fd, true, crc); in sparse_file_import()
470 if (ret < 0) { in sparse_file_import()
482 int ret; in sparse_file_import_auto() local
501 ret = sparse_file_read_normal(s, fd); in sparse_file_import_auto()
502 if (ret < 0) { in sparse_file_import_auto()