diff options
author | thibault.ferrante <thibault.ferrante@gmail.com> | 2021-01-07 17:21:36 +0100 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-01-11 11:26:49 +0200 |
commit | 0fb0d304774630d53867fa3563dfd39246cc67b7 (patch) | |
tree | b65d3ee173f4f7eab613c99487494d476a30965b /src/apk_io.h | |
parent | b58d79e78f704233f7c412343b25f20c8fb5257c (diff) | |
download | apk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.tar.gz apk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.tar.bz2 apk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.tar.xz apk-tools-0fb0d304774630d53867fa3563dfd39246cc67b7.zip |
database: Propagate errors when loading an APKINDEX
In case of failure when loading an APKINDEX, no errors are
propagated to the user which may uncorrectly interpret the
current problem.
Diffstat (limited to 'src/apk_io.h')
-rw-r--r-- | src/apk_io.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/apk_io.h b/src/apk_io.h index adec003..fcdbebc 100644 --- a/src/apk_io.h +++ b/src/apk_io.h @@ -60,7 +60,7 @@ struct apk_ostream; struct apk_istream_ops { void (*get_meta)(struct apk_istream *is, struct apk_file_meta *meta); ssize_t (*read)(struct apk_istream *is, void *ptr, size_t size); - void (*close)(struct apk_istream *is); + int (*close)(struct apk_istream *is); }; #define APK_ISTREAM_SINGLE_READ 0x0001 @@ -103,9 +103,9 @@ static inline void apk_istream_get_meta(struct apk_istream *is, struct apk_file_ { is->ops->get_meta(is, meta); } -static inline void apk_istream_close(struct apk_istream *is) +static inline int apk_istream_close(struct apk_istream *is) { - is->ops->close(is); + return is->ops->close(is); } #define APK_MPART_DATA 1 /* data processed so far */ |