mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
memory-device: forward errors in get_region_size()/get_plugged_size()
Let's properly forward the errors, so errors from get_region_size() / get_plugged_size() can be handled. Users right now call both functions after the device has been realized, which is will never fail, so it is fine to continue using error_abort. While at it, remove a leftover error check (suggested by Igor). Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20181005092024.14344-8-david@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
15cea5ae81
commit
e40c5b6b3f
3 changed files with 8 additions and 10 deletions
|
@ -33,8 +33,8 @@ typedef struct MemoryDeviceClass {
|
|||
InterfaceClass parent_class;
|
||||
|
||||
uint64_t (*get_addr)(const MemoryDeviceState *md);
|
||||
uint64_t (*get_plugged_size)(const MemoryDeviceState *md);
|
||||
uint64_t (*get_region_size)(const MemoryDeviceState *md);
|
||||
uint64_t (*get_plugged_size)(const MemoryDeviceState *md, Error **errp);
|
||||
uint64_t (*get_region_size)(const MemoryDeviceState *md, Error **errp);
|
||||
void (*fill_device_info)(const MemoryDeviceState *md,
|
||||
MemoryDeviceInfo *info);
|
||||
} MemoryDeviceClass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue