mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
memory: Provide an equality function for MemoryRegionSections
Provide a comparison function that checks all the fields are the same. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190814175535.2023-3-dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
44f85d3276
commit
9366cf02e4
@ -504,6 +504,18 @@ struct MemoryRegionSection {
|
||||
bool nonvolatile;
|
||||
};
|
||||
|
||||
static inline bool MemoryRegionSection_eq(MemoryRegionSection *a,
|
||||
MemoryRegionSection *b)
|
||||
{
|
||||
return a->mr == b->mr &&
|
||||
a->fv == b->fv &&
|
||||
a->offset_within_region == b->offset_within_region &&
|
||||
a->offset_within_address_space == b->offset_within_address_space &&
|
||||
int128_eq(a->size, b->size) &&
|
||||
a->readonly == b->readonly &&
|
||||
a->nonvolatile == b->nonvolatile;
|
||||
}
|
||||
|
||||
/**
|
||||
* memory_region_init: Initialize a memory region
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user