numa: Avoid qerror_report_err() outside QMP command handlers

qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP.  It should not be used
elsewhere.  Replace by error_report_err() in initial startup helper
numa_init_func() and board setup helper
memory_region_allocate_system_memory().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Markus Armbruster 2015-02-10 15:06:23 +01:00
parent 12d0cc2db9
commit 29b762f5f0

8
numa.c
View file

@ -146,8 +146,7 @@ int numa_init_func(QemuOpts *opts, void *opaque)
return 0;
error:
qerror_report_err(err);
error_free(err);
error_report_err(err);
if (object) {
QapiDeallocVisitor *dv = qapi_dealloc_visitor_new();
@ -262,8 +261,7 @@ static void allocate_system_memory_nonnuma(MemoryRegion *mr, Object *owner,
* regular RAM allocation.
*/
if (err) {
qerror_report_err(err);
error_free(err);
error_report_err(err);
memory_region_init_ram(mr, owner, name, ram_size, &error_abort);
}
#else
@ -298,7 +296,7 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
}
MemoryRegion *seg = host_memory_backend_get_memory(backend, &local_err);
if (local_err) {
qerror_report_err(local_err);
error_report_err(local_err);
exit(1);
}