mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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}')
|
||||
|
||||
Reference in New Issue
Block a user