From ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 16 Apr 2009 17:05:27 +0300 Subject: pkg: clean up writing of dependencies --- src/info.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/info.c') diff --git a/src/info.c b/src/info.c index 4bc3ddb..7a4c519 100644 --- a/src/info.c +++ b/src/info.c @@ -10,6 +10,7 @@ */ #include +#include #include "apk_defines.h" #include "apk_applet.h" #include "apk_package.h" @@ -85,9 +86,13 @@ static int info_who_owns(struct info_ctx *ctx, struct apk_database *db, } } if (apk_verbosity < 1 && deps != NULL) { - char buf[512]; - apk_deps_format(buf, sizeof(buf), deps); - printf("%s\n", buf); + struct apk_ostream *os; + + os = apk_ostream_to_fd(STDOUT_FILENO); + apk_deps_write(deps, os); + os->write(os, "\n", 1); + os->close(os); + free(deps); } -- cgit v1.2.3