summaryrefslogtreecommitdiffstats
path: root/src/index.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-11-28 16:28:54 +0200
committerTimo Teras <timo.teras@iki.fi>2008-11-28 16:28:54 +0200
commitdc2ffc30e812fc52ad2bf4c11f36a69940f8d1ea (patch)
tree4fc16f961139f7e4b06c33ffdcc7dd7ce81a9567 /src/index.c
parent4bafa681feb2b902553e26fd88df0f06b0c0778a (diff)
io: apk_ostream stuff
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 45b7cf1..91d1ce6 100644
--- a/src/index.c
+++ b/src/index.c
@@ -43,12 +43,17 @@ static int index_main(int argc, char **argv)
{
struct apk_database db;
struct counts counts = {0,0};
+ struct apk_ostream *os;
int i;
apk_db_open(&db, NULL);
for (i = 0; i < argc; i++)
apk_db_pkg_add_file(&db, argv[i]);
- apk_db_index_write(&db, STDOUT_FILENO);
+
+ os = apk_ostream_to_fd(STDOUT_FILENO);
+ apk_db_index_write(&db, os);
+ os->close(os);
+
apk_hash_foreach(&db.available.names, warn_if_no_providers, &counts);
apk_db_close(&db);