selftest: Always use the get_image_fmt helper
Avoid code duplication.
This commit is contained in:
parent
638167358f
commit
aced2c06a0
@ -232,7 +232,7 @@ create_image_from_base_image() {
|
|||||||
image=$decompressed_image
|
image=$decompressed_image
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local image_fmt=$(qemu-img info $image | sed -n "s/file format:\s*\(.*\)/\1/p")
|
local image_fmt=$(get_image_fmt $image)
|
||||||
if [ "$image_fmt" != "raw" ]; then
|
if [ "$image_fmt" != "raw" ]; then
|
||||||
if [ "$image_fmt" == "qcow2" ]; then
|
if [ "$image_fmt" == "qcow2" ]; then
|
||||||
echo "Source image is qcow2, using snapshot..."
|
echo "Source image is qcow2, using snapshot..."
|
||||||
|
Loading…
Reference in New Issue
Block a user