提交 8dbc95cb 编写于 作者: P Peter Krempa

virsh: qemu-monitor-command: Don't print extra newline with --pretty

The prettified JSON string already contains a newline so don't print
another one. This allows to pipe the json output (in conjunction with
the --quiet option) to files without having to truncate them afterwards.
上级 27bdc0af
......@@ -8972,6 +8972,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd)
if (pretty && (tmp = virJSONValueToString(pretty, true))) {
VIR_FREE(result);
result = tmp;
virTrimSpaces(result, NULL);
} else {
vshResetLibvirtError();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册