From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MY9zu-0006n9-Mp for qemu-devel@nongnu.org; Mon, 03 Aug 2009 22:43:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MY9zp-0006dk-BJ for qemu-devel@nongnu.org; Mon, 03 Aug 2009 22:43:29 -0400 Received: from [199.232.76.173] (port=47390 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY9zp-0006dN-5p for qemu-devel@nongnu.org; Mon, 03 Aug 2009 22:43:25 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:59226) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MY9zp-00061e-3d for qemu-devel@nongnu.org; Mon, 03 Aug 2009 22:43:25 -0400 Received: by qyk4 with SMTP id 4so4373279qyk.4 for ; Mon, 03 Aug 2009 19:43:23 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 4 Aug 2009 11:43:23 +0900 Message-ID: <5e93dcec0908031943n43ef28b8n77e70c6a470cd950@mail.gmail.com> From: Ryota Ozaki Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] address incompatible change of qemu-img List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: libvir-list@redhat.com Cc: Ryota OZAKI , qemu-devel@nongnu.org Hi, Latest qemu-img (maybe from 0.11.0-rc0 or later?) changes default unit of size as bytes, it was kilo-bytes so far. (see http://www.mail-archive.com/kvm@vger.kernel.org/msg19183.html) This patch addresses this incompatibility by adding postfix 'K'. This fix is able to keep backward compatibility for old qemu as well, and also even if qemu-img falls back old style or any, this explicit specifying should work well. Thanks, ozaki-r >>From 7d3dd9e592deab5a1d793532cf230d8367372280 Mon Sep 17 00:00:00 2001 From: Ryota Ozaki Date: Tue, 4 Aug 2009 11:11:31 +0900 Subject: [PATCH] address incompatible change of qemu-img --- src/storage_backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/storage_backend.c b/src/storage_backend.c index 07a2e48..8824218 100644 --- a/src/storage_backend.c +++ b/src/storage_backend.c @@ -446,7 +446,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn, /* Size in KB */ - snprintf(size, sizeof(size), "%llu", vol->capacity/1024); + snprintf(size, sizeof(size), "%lluK", vol->capacity/1024); if (virRun(conn, imgargv, NULL) < 0) { VIR_FREE(imgargv[0]); -- 1.6.0.6