diff options
Diffstat (limited to 'ingest.c')
-rw-r--r-- | ingest.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ingest.c b/ingest.c index 9fa754d..6ba387b 100644 --- a/ingest.c +++ b/ingest.c @@ -22,6 +22,8 @@ #include <sysexits.h> #include <unistd.h> +#include "stream.h" + int main(int argc, char *argv[]) { if (argc < 2) return EX_USAGE; const char *path = argv[1]; @@ -49,7 +51,7 @@ int main(int argc, char *argv[]) { char buf[4096]; ssize_t totalSize = 0; - while (totalSize < 1024 * 1024) { + while (totalSize < STREAM_SIZE) { ssize_t readSize = read(remote, buf, sizeof(buf)); if (readSize < 0) err(EX_IOERR, "read(%d)", remote); if (!readSize) return EX_OK; |