]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: Fix qcow2_truncate() error return value
authorKevin Wolf <kwolf@redhat.com>
Tue, 26 Jun 2018 11:22:45 +0000 (13:22 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 29 Jun 2018 12:20:56 +0000 (14:20 +0200)
commitae5475e82fd1ebb24f4f77cf28f59ca6548c6136
tree961e73eb68a76836836b95ed180153345e54e6d2
parent7c8952697e9c44931090251e142c1d3108c22be4
qcow2: Fix qcow2_truncate() error return value

If qcow2_alloc_clusters_at() returns an error, we do need to negate it
to get back the positive errno code for error_setg_errno(), but we still
need to return the negative error code.

Fixes: 772d1f973f87269f6a4a4ea4b880680f3779bbdf
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2.c