_filter_qmp should be able to correctly filter out the QMP version
object for pretty JSON output.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
{
_filter_win32 | \
sed -e 's#\("\(micro\)\?seconds": \)[0-9]\+#\1 TIMESTAMP#g' \
- -e 's#^{"QMP":.*}$#QMP_VERSION#'
+ -e 's#^{"QMP":.*}$#QMP_VERSION#' \
+ -e '/^ "QMP": {\s*$/, /^ }\s*$/ c\' \
+ -e ' QMP_VERSION'
}
# replace driver-specific options in the "Formatting..." line