]> git.proxmox.com Git - mirror_qemu.git/commit
range: add some more functions
authorDavid Hildenbrand <david@redhat.com>
Fri, 14 Dec 2018 13:10:42 +0000 (14:10 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 10 Jan 2019 00:09:31 +0000 (22:09 -0200)
commitf3b0b626f615c6155d0cbb2f1781e1d1476144fc
treee8562b24fb34b4cbbd91df6f57a9bb7c32619560
parentc73e661f2a52df339ddd48833f5dd623ddc7359b
range: add some more functions

Add some more functions that will be used in memory-device context.

range_init(): Init using lower bound and size, check for validity
range_init_nofail(): Init using lower bound and size, validity asserted
range_size(): Extract the size of a range
range_overlaps_range(): Check for overlaps of two ranges
range_contains_range(): Check if one range is contained in the other

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20181214131043.25071-2-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
include/qemu/range.h