mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
virsh: cmdScreenshot: fix cbdata passing to virshStreamSink
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. https://bugzilla.redhat.com/show_bug.cgi?id=1875195 Signed-off-by: Ján Tomko <jtomko@redhat.com> Fixes: 9e745a97171e10f050962c166082439d6724e245 Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
0b261edd15
commit
3144e881b1
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user