From 6d33b5b222b13fbaf65f2b6a5fbdbc2a15cb3013 Mon Sep 17 00:00:00 2001 From: Charlotte Meyer 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 c41c861..a6fd661 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); }