From a1853dca74362551ec1434b2e15acfcdd53caa99 Mon Sep 17 00:00:00 2001 From: Yuri Pudgorodskiy Date: Tue, 13 Oct 2015 18:41:23 +0300 Subject: qga: guest-exec simple stdin/stdout/stderr redirection Implemented with base64-encoded strings in qga json protocol. Glib portable GIOChannel is used for data I/O. Optinal stdin parameter of guest-exec command is now used as stdin content for spawned subprocess. If capture-output bool flag is specified, guest-exec redirects out/err file descriptiors internally to pipes and collects subprocess output. Guest-exe-status is modified to return this collected data to requestor in base64 encoding. Signed-off-by: Yuri Pudgorodskiy Signed-off-by: Denis V. Lunev Signed-off-by: Michael Roth * switch from 'struct GuestIOExecData' to 'GuestIOExecData' * s/TRUE/true/g, s/FALSE/false/g for gboolean return values * s/inp_data/input_data/ Signed-off-by: Michael Roth --- qga/qapi-schema.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qga/qapi-schema.json') diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json index 4900b5e937..78362e071d 100644 --- a/qga/qapi-schema.json +++ b/qga/qapi-schema.json @@ -941,12 +941,17 @@ # @err-data: #optional base64-encoded stderr of the process # Note: @out-data and @err-data are present only # if 'capture-output' was specified for 'guest-exec' +# @out-truncated: #optional true if stdout was not fully captured +# due to size limitation. +# @err-truncated: #optional true if stderr was not fully captured +# due to size limitation. # # Since: 2.5 ## { 'struct': 'GuestExecStatus', 'data': { 'exited': 'bool', '*exitcode': 'int', '*signal': 'int', - '*out-data': 'str', '*err-data': 'str' }} + '*out-data': 'str', '*err-data': 'str', + '*out-truncated': 'bool', '*err-truncated': 'bool' }} ## # @guest-exec-status # -- cgit v1.2.1