diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-10 17:51:03 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-10 17:56:27 +0200 |
commit | ad1691aa33cfc1b1558ce10e93552d0eb1cdcd63 (patch) | |
tree | 8c53c5cd0202ed638e9c45d1eaece8e486f17a0c /lib/io/src/istream.c | |
parent | 605fd3e3a2656438dc0283699fc4a4b44b8b71db (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/istream.c')
-rw-r--r-- | lib/io/src/istream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/io/src/istream.c b/lib/io/src/istream.c index 6171f2c..b4c709c 100644 --- a/lib/io/src/istream.c +++ b/lib/io/src/istream.c @@ -19,7 +19,7 @@ sqfs_s32 istream_read(istream_t *strm, void *data, size_t size) size_t diff; int ret; - ret = istream_get_buffered_data(strm, &ptr, &diff); + ret = istream_get_buffered_data(strm, &ptr, &diff, size); if (ret > 0) break; if (ret < 0) @@ -48,7 +48,7 @@ int istream_skip(istream_t *strm, sqfs_u64 size) size_t diff; int ret; - ret = istream_get_buffered_data(strm, &ptr, &diff); + ret = istream_get_buffered_data(strm, &ptr, &diff, size); if (ret < 0) return ret; if (ret > 0) { @@ -81,7 +81,7 @@ sqfs_s32 istream_splice(istream_t *in, ostream_t *out, sqfs_u32 size) size_t diff; int ret; - ret = istream_get_buffered_data(in, &ptr, &diff); + ret = istream_get_buffered_data(in, &ptr, &diff, size); if (ret < 0) return ret; if (ret > 0) |