summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-03-04 12:13:32 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-03-08 14:57:42 +0000
commitedffc79f70141f1af2873db50c30a036bf5c61b7 (patch)
treeda8ed95fae519f2a2d5343d13edb2fc8bc8178e7
parent93d9d50ac85988ef75c63408db2c19f5bfcad9f3 (diff)
downloadlibguestfs-edffc79f70141f1af2873db50c30a036bf5c61b7.tar.gz
libguestfs-edffc79f70141f1af2873db50c30a036bf5c61b7.tar.xz
libguestfs-edffc79f70141f1af2873db50c30a036bf5c61b7.zip
virt-make-fs: Round disk size to integer, fix for qemu-img 0.14.
qemu-img used to allow you to specify a fractional image size in bytes (or at least, it used to ignore the part after the decimal place). In qemu-img 0.14 it no longer does this so we round down the size to a whole number of bytes. (cherry picked from commit eda9826d25336bcf661700270c580d4d62128750)
-rwxr-xr-xtools/virt-make-fs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/virt-make-fs b/tools/virt-make-fs
index 16f02a91..46edbea6 100755
--- a/tools/virt-make-fs
+++ b/tools/virt-make-fs
@@ -393,6 +393,8 @@ if (!defined $size) {
}
}
+$size = int ($size);
+
# Create the output disk.
# Take the unusual step of invoking qemu-img here.