From nobody Mon Apr 29 13:03:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15168701184201023.7185853625397; Thu, 25 Jan 2018 00:48:38 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 70258A8AA; Thu, 25 Jan 2018 08:48:36 +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 DB900600D1; Thu, 25 Jan 2018 08:48:34 +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 A78CA18033DA; Thu, 25 Jan 2018 08:48:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0P8mSPi025313 for ; Thu, 25 Jan 2018 03:48:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id CB7DF2B9EA; Thu, 25 Jan 2018 08:48:28 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C726D600CC for ; Thu, 25 Jan 2018 08:48:25 +0000 (UTC) Received: from pcmarie.nine.ch (pcmarie.nine.ch [217.150.242.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA16C12E4F9 for ; Thu, 25 Jan 2018 08:48:23 +0000 (UTC) Received: from marie by pcmarie.nine.ch with local (Exim 4.86_2) (envelope-from ) id 1eecrF-00008k-R1; Thu, 25 Jan 2018 09:26:05 +0100 From: Marius Rieder To: libvir-list@redhat.com Date: Thu, 25 Jan 2018 09:25:58 +0100 Message-Id: <1516868758-470-1-git-send-email-marius.rieder@nine.ch> X-Greylist: Delayed for 00:22:16 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 25 Jan 2018 08:48:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 25 Jan 2018 08:48:24 +0000 (UTC) for IP:'217.150.242.81' DOMAIN:'pcmarie.nine.ch' HELO:'pcmarie.nine.ch' FROM:'marie@pcmarie.nine.ch' RCPT:'' X-RedHat-Spam-Score: -0.01 (T_RP_MATCHES_RCVD) 217.150.242.81 pcmarie.nine.ch 217.150.242.81 pcmarie.nine.ch X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Marius Rieder Subject: [libvirt] [PATCH-RUBY] The first argument passed should be the disk not the size. 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 25 Jan 2018 08:48:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Calling block_resize on a Libvirt::Domain object leads to a TypeError. The reason seems to be that ruby-libvirt tries to convert the size instead of the disk to a string to pass as the disk parameter. --- ext/libvirt/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/libvirt/domain.c b/ext/libvirt/domain.c index 7812450..aff1842 100644 --- a/ext/libvirt/domain.c +++ b/ext/libvirt/domain.c @@ -2882,7 +2882,7 @@ static VALUE libvirt_domain_block_resize(int argc, VA= LUE *argv, VALUE d) ruby_libvirt_generate_call_nil(virDomainBlockResize, ruby_libvirt_connect_get(d), ruby_libvirt_domain_get(d), - StringValueCStr(size), NUM2ULL(size), + StringValueCStr(disk), NUM2ULL(size), ruby_libvirt_value_to_uint(flags)); } #endif --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list