aboutsummaryrefslogtreecommitdiff
path: root/lib/io/src/xfrm/istream.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-10 17:51:03 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-10 17:56:27 +0200
commitad1691aa33cfc1b1558ce10e93552d0eb1cdcd63 (patch)
tree8c53c5cd0202ed638e9c45d1eaece8e486f17a0c /lib/io/src/xfrm/istream.c
parent605fd3e3a2656438dc0283699fc4a4b44b8b71db (diff)
libio: add desired read size to istream_get_buffered_data
This properly maps to all of our use cases and makes istream_precache obsolete. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/io/src/xfrm/istream.c')
-rw-r--r--lib/io/src/xfrm/istream.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/io/src/xfrm/istream.c b/lib/io/src/xfrm/istream.c
index 2ada5db..8755cb6 100644
--- a/lib/io/src/xfrm/istream.c
+++ b/lib/io/src/xfrm/istream.c
@@ -37,11 +37,8 @@ static int xfrm_precache(istream_t *base)
const sqfs_u8 *ptr;
size_t avail;
- ret = istream_precache(xfrm->wrapped);
- if (ret != 0)
- return ret;
-
- ret = istream_get_buffered_data(xfrm->wrapped, &ptr, &avail);
+ ret = istream_get_buffered_data(xfrm->wrapped, &ptr, &avail,
+ sizeof(xfrm->uncompressed));
if (ret < 0)
return ret;
if (ret > 0) {