diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-04-16 17:05:27 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-04-16 17:05:27 +0300 |
commit | ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8 (patch) | |
tree | 12885a6778a0a746fc0ff62b0be4b75f368cebc9 /src/info.c | |
parent | 968dfbb8b376de2dc6f2441dc3966d1416ad0046 (diff) | |
download | apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.tar.gz apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.tar.bz2 apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.tar.xz apk-tools-ec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8.zip |
pkg: clean up writing of dependencies
Diffstat (limited to 'src/info.c')
-rw-r--r-- | src/info.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -10,6 +10,7 @@ */ #include <stdio.h> +#include <unistd.h> #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); } |