[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] address incompatible change of qemu-img

From: Ryota Ozaki
Subject: [Qemu-devel] [PATCH] address incompatible change of qemu-img
Date: Tue, 4 Aug 2009 11:43:23 +0900


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/address@hidden/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.


>From 7d3dd9e592deab5a1d793532cf230d8367372280 Mon Sep 17 00:00:00 2001
From: Ryota Ozaki <address@hidden>
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) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]