summaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-06-29 11:22:55 +0300
committerTimo Teras <timo.teras@iki.fi>2009-06-29 11:22:55 +0300
commit9858ffff69ce2e3df353b2c1e65a987c58f32fac (patch)
treeb9ecaccfb8f9e3f67a4ccb2ce7cb3f699f7e7f5c /src/io.c
parent233918e518f72e469ba39206abf70250bd6fc54a (diff)
downloadapk-tools-9858ffff69ce2e3df353b2c1e65a987c58f32fac.tar.bz2
apk-tools-9858ffff69ce2e3df353b2c1e65a987c58f32fac.tar.xz
cache: new applet (ref #49)
Administrative tool to download or delete files to/from the cache.
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 22a69e5..722bccb 100644
--- a/src/io.c
+++ b/src/io.c
@@ -331,7 +331,7 @@ static size_t tee_read(void *stream, void **ptr)
{
struct apk_tee_bstream *tbs =
container_of(stream, struct apk_tee_bstream, bs);
- size_t size;
+ ssize_t size;
size = tbs->inner_bs->read(tbs->inner_bs, ptr);
if (size >= 0)
@@ -373,6 +373,7 @@ struct apk_bstream *apk_bstream_tee(struct apk_bstream *from, const char *to)
};
tbs->inner_bs = from;
tbs->fd = fd;
+ tbs->size = 0;
return &tbs->bs;
}