[Pkg-libvirt-commits] [libguestfs] 01/179: v2v: 'du -b' doesn't show real (sparse) size.
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 31 19:07:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit ae19e8f29f43db8514c18009e736e643ad9b25f9
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Oct 2 13:00:13 2014 +0100
v2v: 'du -b' doesn't show real (sparse) size.
This caused the actual size to be wrong (in OVF output).
Use --block-size=1 instead.
---
v2v/v2v.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 970dfb2..ddeee18 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -621,7 +621,7 @@ and actual_target_size target =
* to get the used size in bytes.
*)
and du filename =
- let cmd = sprintf "du -b %s | awk '{print $1}'" (quote filename) in
+ let cmd = sprintf "du --block-size=1 %s | awk '{print $1}'" (quote filename) in
let lines = external_command ~prog cmd in
(* Ignore errors because we want to avoid failures after copying. *)
match lines with
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list