mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-21 13:57:56 +03:00
B #-: Fix output parsing of new qemu-img (#2605)
Although `qemu-io -c length $img` would be better we would need to recalc back to bytes.
This commit is contained in:
parent
a7357a0040
commit
8b7d7029db
@ -65,7 +65,7 @@ function image_format {
|
||||
# @return string representation of the format, empty if error
|
||||
#-------------------------------------------------------------------------------
|
||||
function image_vsize {
|
||||
echo "$($QEMU_IMG info "${1}" 2>/dev/null | sed -n 's/.*(\([0-9]*\) bytes).*/\1/p')"
|
||||
echo "$($QEMU_IMG info --output json "${1}" | jq '."virtual-size"')"
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user