From nobody Thu Apr 25 00:29:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599642364; cv=none; d=zohomail.com; s=zohoarc; b=cy9iZpH9irYuu4c+bAlFxDkFeAVnOqmINUz6u1S98i6d+1GsLkqQCLuGnm/A+ujZh8lgtSPbYKelAL86cpU+YtDdhAe354kkArP53QYeMk+XkgeXcnIuhSkOnnEb0TeRgFDA6DV7WX5cAL75b5lqAHHoW+b63sT7cmtzAd1KFOY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599642364; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Lljukb+lB4njPcVfpatlUou7wlyONMCSQInpneeK12E=; b=Gitpima4hHGyTtWP+kwvpE6t5+4p8hGp+6+HDsacBwG9sR8IhqnmIhqdRDy11Nc+ZtjP6CuDydFiRwmyAxXEa/4Tp91eVJ27UXBXjw4JS2Us48Z83YmA5g0UZBCWQQLRvV7t+1SQDW08wpxzxnmkkduKCIy6wnV1p9hUVmy3xNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1599642364679507.98504004410904; Wed, 9 Sep 2020 02:06:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-IcwhKDz8Mcq8WigfqSqB3w-1; Wed, 09 Sep 2020 05:06:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 485041084C81; Wed, 9 Sep 2020 09:05:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FCB67E46E; Wed, 9 Sep 2020 09:05:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3BAB518095FF; Wed, 9 Sep 2020 09:05:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08995iDx002621 for ; Wed, 9 Sep 2020 05:05:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7217F1002388; Wed, 9 Sep 2020 09:05:44 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.43.2.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED5AB1002382 for ; Wed, 9 Sep 2020 09:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599642363; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Lljukb+lB4njPcVfpatlUou7wlyONMCSQInpneeK12E=; b=ghluXp8MMX768CABae3FYa77MlHm/NFII7PqnqKhEljQB9oPe4stjgrhj3zPpPngl3uc4Z uoPuOhgauyrMtE9CHDiqC3CE7vt4ly/+OJuGzrcVbp5dCg3wtBIg6+jvlcbLqDqdGjEskt JBXFAeSSRmW1hmJbV9b02HxHyOZZ3GM= X-MC-Unique: IcwhKDz8Mcq8WigfqSqB3w-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] virsh: cmdScreenshot: fix cbdata passing to virshStreamSink Date: Wed, 9 Sep 2020 11:05:37 +0200 Message-Id: <9a228f5e582d9daa3022077c747571eec3c41313.1599642315.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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=C3=A1n Tomko Fixes: 9e745a97171e10f050962c166082439d6724e245 https://bugzilla.redhat.com/show_bug.cgi?id=3D1875195 Reviewed-by: Martin Kletzander --- 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 =3D false; char *mime =3D NULL; virshControlPtr priv =3D ctl->privData; + virshStreamCallbackData cbdata; =20 if (vshCommandOptStringReq(ctl, cmd, "file", (const char **) &file) < = 0) return false; @@ -5663,7 +5664,10 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd) created =3D true; } =20 - if (virStreamRecvAll(st, virshStreamSink, &fd) < 0) { + cbdata.ctl =3D ctl; + cbdata.fd =3D fd; + + if (virStreamRecvAll(st, virshStreamSink, &cbdata) < 0) { vshError(ctl, _("could not receive data from domain %s"), name); goto cleanup; } --=20 2.26.2