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.
This commit is contained in:
Peter Krempa 2016-08-01 06:13:39 +02:00
parent 27bdc0af00
commit 8dbc95cbd1

View File

@ -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();
}