]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
qcow2: Add cluster type parameter to qcow2_get_host_offset()
authorAlberto Garcia <berto@igalia.com>
Fri, 10 Jul 2020 16:12:59 +0000 (18:12 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 25 Aug 2020 06:33:20 +0000 (08:33 +0200)
commitca4a0bb81b5259e326a30b758959911459d2a266
treee45292f92fe559ee5e496887289bf06bafd755f3
parentc94d037825ccecf4819ca63f8838561eba49bc80
qcow2: Add cluster type parameter to qcow2_get_host_offset()

This function returns an integer that can be either an error code or a
cluster type (a value from the QCow2ClusterType enum).

We are going to start using subcluster types instead of cluster types
in some functions so it's better to use the exact data types instead
of integers for clarity and in order to detect errors more easily.

This patch makes qcow2_get_host_offset() return 0 on success and
puts the returned cluster type in a separate parameter. There are no
semantic changes.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <396b6eab1859a271551dcd7dcba77f8934aa3c3f.1594396418.git.berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-cluster.c
block/qcow2.c
block/qcow2.h