]> git.proxmox.com Git - mirror_qemu.git/commit
range: Introduce range_inverse_array()
authorEric Auger <eric.auger@redhat.com>
Thu, 19 Oct 2023 13:45:14 +0000 (15:45 +0200)
committerCédric Le Goater <clg@redhat.com>
Fri, 3 Nov 2023 08:20:31 +0000 (09:20 +0100)
commitb439595a08d79120325de4684698bb7b6516aa8a
tree200d2130e1868c97b5288a28d13a1872a5fb2a8c
parent908cae0de4fd63a58f5a7dc447f843a5be9cff46
range: Introduce range_inverse_array()

This helper reverses a list of regions within a [low, high]
span, turning original regions into holes and original
holes into actual regions, covering the whole UINT64_MAX span.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Yanghang Liu <yanghliu@redhat.com>
Reviewed-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
include/qemu/range.h
util/range.c