mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00

Rename qpci_init_pc in qpci_pc_new and qpci_init_spapr in qpci_spapr_new, since these function actually allocate a new pci struct and initialize it (compare to object_new and object_initialize). Changed QOSOps field name from qpci_init to qpci_new. Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
34 lines
757 B
C
34 lines
757 B
C
#include "qemu/osdep.h"
|
|
#include "libqos/libqos-spapr.h"
|
|
#include "libqos/malloc-spapr.h"
|
|
#include "libqos/pci-spapr.h"
|
|
|
|
static QOSOps qos_ops = {
|
|
.init_allocator = spapr_alloc_init_flags,
|
|
.uninit_allocator = spapr_alloc_uninit,
|
|
.qpci_new = qpci_new_spapr,
|
|
.qpci_free = qpci_free_spapr,
|
|
.shutdown = qtest_spapr_shutdown,
|
|
};
|
|
|
|
QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap)
|
|
{
|
|
return qtest_vboot(&qos_ops, cmdline_fmt, ap);
|
|
}
|
|
|
|
QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...)
|
|
{
|
|
QOSState *qs;
|
|
va_list ap;
|
|
|
|
va_start(ap, cmdline_fmt);
|
|
qs = qtest_vboot(&qos_ops, cmdline_fmt, ap);
|
|
va_end(ap);
|
|
|
|
return qs;
|
|
}
|
|
|
|
void qtest_spapr_shutdown(QOSState *qs)
|
|
{
|
|
return qtest_common_shutdown(qs);
|
|
}
|