aboutsummaryrefslogtreecommitdiff
path: root/qga/qapi-schema.json
diff options
context:
space:
mode:
authorDaniel Xu <dxu@dxuuu.xyz>2023-03-22 18:19:27 -0600
committerKonstantin Kostiuk <kkostiuk@redhat.com>2023-05-04 09:12:48 +0000
commit810f677ab86e649d449233b435197552024b016d (patch)
tree7c708199a9ccca2e279be46df67b217335adaddf /qga/qapi-schema.json
parent9c5ccc52abe3977be53e42af84a6e590b3e1db19 (diff)
downloadqemu-810f677ab86e649d449233b435197552024b016d.zip
qemu-810f677ab86e649d449233b435197552024b016d.tar.gz
qemu-810f677ab86e649d449233b435197552024b016d.tar.bz2
qga: Add `merged` variant to GuestExecCaptureOutputMode
Currently, any captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This means that downstream consumers have no way to reassemble the captured data back into the original stream. This is relevant for chatty and semi-interactive (ie. read only) CLI tools. Such tools may deliberately interleave stdout and stderr for visual effect. If segregated, the output becomes harder to visually understand. This commit adds a new enum variant to the GuestExecCaptureOutputMode qapi to merge the output streams such that consumers can have a pristine view of the original command output. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'qga/qapi-schema.json')
-rw-r--r--qga/qapi-schema.json5
1 files changed, 4 insertions, 1 deletions
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index 44e44c2..5a75e81 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -1210,11 +1210,14 @@
# @stderr: only capture stderr
# @separated: capture both stdout and stderr, but separated into
# GuestExecStatus out-data and err-data, respectively
+# @merged: capture both stdout and stderr, but merge together
+# into out-data. not effective on windows guests.
#
# Since: 8.0
##
{ 'enum': 'GuestExecCaptureOutputMode',
- 'data': [ 'none', 'stdout', 'stderr', 'separated' ] }
+ 'data': [ 'none', 'stdout', 'stderr', 'separated',
+ { 'name': 'merged', 'if': { 'not': 'CONFIG_WIN32' } } ] }
##
# @GuestExecCaptureOutput: