From 0191435bd469cb8cf6ada665740e13ee722c0496 Mon Sep 17 00:00:00 2001 From: buffet Date: Wed, 10 Apr 2019 11:42:06 +0200 Subject: [PATCH] kiwmic: Read reply from kiwmi --- kiwmic/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kiwmic/main.c b/kiwmic/main.c index ea50f33..5e4a9d6 100644 --- a/kiwmic/main.c +++ b/kiwmic/main.c @@ -57,7 +57,13 @@ main(int argc, char **argv) fprintf(socket_file, "%c", '\0'); fflush(socket_file); - // TODO: read result + int c; + while ((c = getc(socket_file)) != '\0') { + putchar(c); + if (c == '\n') { + fflush(stdout); + } + } fclose(socket_file); }