summaryrefslogtreecommitdiff
path: root/lib/sqfs/data_reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/data_reader.c')
-rw-r--r--lib/sqfs/data_reader.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/sqfs/data_reader.c b/lib/sqfs/data_reader.c
index 7f857b2..96ccb39 100644
--- a/lib/sqfs/data_reader.c
+++ b/lib/sqfs/data_reader.c
@@ -110,13 +110,9 @@ int data_reader_dump_file(data_reader_t *data, file_info_t *fi, int outfd,
if (bs == 0) {
memset(data->buffer, 0, unpackedsz);
compressed = false;
- } else {
- ret = read_retry(data->sqfsfd, data->buffer, bs);
- if (ret < 0)
- goto fail_rd;
-
- if ((size_t)ret < bs)
- goto fail_trunc;
+ } else if (read_data("reading data block",
+ data->sqfsfd, data->buffer, bs)) {
+ return -1;
}
if (compressed) {
@@ -163,12 +159,6 @@ fail_sparse:
fail_seek:
perror("seek on squashfs");
return -1;
-fail_rd:
- perror("reading from squashfs");
- return -1;
-fail_trunc:
- fputs("reading from squashfs: unexpected end of file\n", stderr);
- return -1;
fail_bs:
fputs("found compressed block larger than block size\n", stderr);
return -1;