sparsify: Fix use of closed handle (thanks Olaf Hering).

This fixes commit faaedeb343.

Also contains an update to the test which tests the format
auto-detect path.
This commit is contained in:
Richard W.M. Jones
2012-09-04 22:29:09 +01:00
parent bdb5689f58
commit 9c4097dfd8
2 changed files with 2 additions and 2 deletions

View File

@@ -351,7 +351,7 @@ let output_format =
| Some fmt -> fmt (* user specified input format, use that *)
| None ->
(* Don't know, so we must autodetect. *)
match g#disk_format indisk with
match (new G.guestfs ())#disk_format indisk with
| "unknown" ->
error (f_"cannot detect input disk format; use the --format parameter")
| fmt -> fmt

View File

@@ -37,7 +37,7 @@ rm /boot/big
umount-all
EOF
$VG ./virt-sparsify --debug-gc --format raw test1.img --convert qcow2 test2.img
$VG ./virt-sparsify --debug-gc test1.img --convert qcow2 test2.img
size_before=$(du -s test1.img | awk '{print $1}')
size_after=$(du -s test2.img | awk '{print $1}')