X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Ftools%2Fsysdb%2Fcommand.c;h=4de2b44e4fc79245027a22c5c2932bd82b46f742;hp=c7ca310a086230268272b46dcb7c268733b106b8;hb=dabdb5d3bde5d81b197dc457ad0be95450cbf9b5;hpb=daf9e92a1a3bf86a5cdbb2f3cc7d9c37f050174d diff --git a/src/tools/sysdb/command.c b/src/tools/sysdb/command.c index c7ca310..4de2b44 100644 --- a/src/tools/sysdb/command.c +++ b/src/tools/sysdb/command.c @@ -33,6 +33,7 @@ #include "tools/sysdb/command.h" #include "tools/sysdb/input.h" +#include "tools/sysdb/json.h" #include "frontend/proto.h" #include "utils/error.h" @@ -89,7 +90,9 @@ data_printer(sdb_strbuf_t *buf) /* At the moment, we don't care about the result type. We simply print the * result without further parsing it. */ sdb_strbuf_skip(buf, 0, sizeof(uint32_t)); - printf("%s\n", sdb_strbuf_string(buf)); + if (sdb_json_print(buf)) + sdb_log(SDB_LOG_ERR, "Failed to print result"); + printf("\n"); } /* data_printer */ static struct {