提交 42301513 编写于 作者: J Jiri Denemark

qemucapsprobe: Don't put empty line at EOF

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 70a57689
......@@ -62,6 +62,7 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
const char *line,
qemuMonitorMessagePtr msg)
{
static bool first = true;
virJSONValuePtr value = NULL;
char *json = NULL;
int ret;
......@@ -76,6 +77,11 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
char *p;
bool skip = false;
if (first)
first = false;
else
putchar('\n');
for (p = json; *p; p++) {
if (skip && *p == '\n') {
continue;
......@@ -84,7 +90,6 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
putchar(*p);
}
}
putchar('\n');
}
VIR_FREE(json);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册