On Wed, Sep 09, 2020 at 11:05:37AM +0200, Ján Tomko wrote:
The changes for sparse stream support started passing
virshStreamCallbackDataPtr to virshStreamSink
instead of passing a simple file descriptor, but
forgot to adjust all the callers.
Fix it in cmdScreenshot as well.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Fixes: 9e745a97171e10f050962c166082439d6724e245
https://bugzilla.redhat.com/show_bug.cgi?id=1875195
---
Reviewed-by: Martin Kletzander <mkletzan(a)redhat.com>
tools/virsh-domain.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 31597ee469..d1d3f8e566 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5628,6 +5628,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
bool generated = false;
char *mime = NULL;
virshControlPtr priv = ctl->privData;
+ virshStreamCallbackData cbdata;
if (vshCommandOptStringReq(ctl, cmd, "file", (const char **) &file)
< 0)
return false;
@@ -5663,7 +5664,10 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
created = true;
}
- if (virStreamRecvAll(st, virshStreamSink, &fd) < 0) {
+ cbdata.ctl = ctl;
+ cbdata.fd = fd;
+
+ if (virStreamRecvAll(st, virshStreamSink, &cbdata) < 0) {
vshError(ctl, _("could not receive data from domain %s"), name);
goto cleanup;
}
--
2.26.2