mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-07 09:19:19 +00:00
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:
parent
27bdc0af00
commit
8dbc95cbd1
@ -8972,6 +8972,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (pretty && (tmp = virJSONValueToString(pretty, true))) {
|
if (pretty && (tmp = virJSONValueToString(pretty, true))) {
|
||||||
VIR_FREE(result);
|
VIR_FREE(result);
|
||||||
result = tmp;
|
result = tmp;
|
||||||
|
virTrimSpaces(result, NULL);
|
||||||
} else {
|
} else {
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user