提交 78d2bb74 编写于 作者: N Nitesh Konkar 提交者: John Ferlan

Don't print extra newline in virsh domstats output

Signed-off-by: NNitesh Konkar <nitkon12@linux.vnet.ibm.com>
上级 9b1bd138
...@@ -2047,7 +2047,6 @@ virshDomainStatsPrintRecord(vshControl *ctl ATTRIBUTE_UNUSED, ...@@ -2047,7 +2047,6 @@ virshDomainStatsPrintRecord(vshControl *ctl ATTRIBUTE_UNUSED,
VIR_FREE(param); VIR_FREE(param);
} }
vshPrint(ctl, "\n");
return true; return true;
} }
...@@ -2145,9 +2144,13 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd) ...@@ -2145,9 +2144,13 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
goto cleanup; goto cleanup;
} }
for (next = records; *next; next++) { next = records;
while (*next) {
if (!virshDomainStatsPrintRecord(ctl, *next, raw)) if (!virshDomainStatsPrintRecord(ctl, *next, raw))
goto cleanup; goto cleanup;
if (*(++next))
vshPrint(ctl, "\n");
} }
ret = true; ret = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册