summaryrefslogtreecommitdiffstats
path: root/src/info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/info.c')
-rw-r--r--src/info.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/info.c b/src/info.c
index 4bc3ddb280a..7a4c519f637 100644
--- a/src/info.c
+++ b/src/info.c
@@ -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);
}