diff options
author | Timo Teräs <timo.teras@iki.fi> | 2020-01-11 09:16:38 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-01-11 11:20:48 +0200 |
commit | 7caa21773160f9be4d095ce0489d05e8d0131312 (patch) | |
tree | 0e023031acbbc2bc1d82de6ba3cfc127cb955e40 /src/package.c | |
parent | 6da3e8eb15c0456b9908bedfdeced2f3a550b58c (diff) | |
download | apk-tools-7caa21773160f9be4d095ce0489d05e8d0131312.tar.gz apk-tools-7caa21773160f9be4d095ce0489d05e8d0131312.tar.bz2 apk-tools-7caa21773160f9be4d095ce0489d05e8d0131312.tar.xz apk-tools-7caa21773160f9be4d095ce0489d05e8d0131312.zip |
convert remaining locations to use istream instead of bstream
Diffstat (limited to 'src/package.c')
-rw-r--r-- | src/package.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/package.c b/src/package.c index 12f2245..cbcdfce 100644 --- a/src/package.c +++ b/src/package.c @@ -904,8 +904,7 @@ int apk_pkg_read(struct apk_database *db, const char *file, { struct read_info_ctx ctx; struct apk_file_info fi; - struct apk_bstream *bs; - struct apk_istream *tar; + struct apk_istream *is, *tar; int r; r = apk_fileinfo_get(AT_FDCWD, file, APK_CHECKSUM_NONE, &fi); @@ -918,16 +917,16 @@ int apk_pkg_read(struct apk_database *db, const char *file, r = -ENOMEM; if (ctx.pkg == NULL) goto err; - bs = apk_bstream_from_file(AT_FDCWD, file); - if (IS_ERR_OR_NULL(bs)) { - r = PTR_ERR(bs) ?: -EIO; + is = apk_istream_from_file(AT_FDCWD, file); + if (IS_ERR_OR_NULL(is)) { + r = PTR_ERR(is) ?: -EIO; goto err; } ctx.db = db; ctx.pkg->size = fi.size; - tar = apk_bstream_gunzip_mpart(bs, apk_sign_ctx_mpart_cb, sctx); + tar = apk_istream_gunzip_mpart(is, apk_sign_ctx_mpart_cb, sctx); r = apk_tar_parse(tar, read_info_entry, &ctx, &db->id_cache); apk_istream_close(tar); if (r < 0 && r != -ECANCELED) |