Commit 143e6db6 authored by Emanuele Giuseppe Esposito's avatar Emanuele Giuseppe Esposito Committed by Paolo Bonzini
Browse files

tests/libqos: rename qpci_init_pc and qpci_init_spapr functions



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: default avatarEmanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 34c97748
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ static void data_test_init(e1000e_device *d)
    test_alloc = pc_alloc_init(global_qtest);
    g_assert_nonnull(test_alloc);

    test_bus = qpci_init_pc(global_qtest, test_alloc);
    test_bus = qpci_new_pc(global_qtest, test_alloc);
    g_assert_nonnull(test_bus);

    e1000e_device_init(test_bus, d);
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ static QPCIBus *test_start_get_bus(const TestData *s)
    cmdline = g_strdup_printf("-smp %d", s->num_cpus);
    qtest_start(cmdline);
    g_free(cmdline);
    return qpci_init_pc(global_qtest, NULL);
    return qpci_new_pc(global_qtest, NULL);
}

static void test_i440fx_defaults(gconstpointer opaque)
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ static QPCIDevice *get_pci_device(QPCIBar *bmdma_bar, QPCIBar *ide_bar)
    uint16_t vendor_id, device_id;

    if (!pcibus) {
        pcibus = qpci_init_pc(global_qtest, NULL);
        pcibus = qpci_new_pc(global_qtest, NULL);
    }

    /* Find PCI device and verify it's the right one */
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ QPCIDevice *get_ahci_device(QTestState *qts, uint32_t *fingerprint)
    uint32_t ahci_fingerprint;
    QPCIBus *pcibus;

    pcibus = qpci_init_pc(qts, NULL);
    pcibus = qpci_new_pc(qts, NULL);

    /* Find the AHCI PCI device and verify it's the right one. */
    ahci = qpci_device_find(pcibus, QPCI_DEVFN(0x1F, 0x02));
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
static QOSOps qos_ops = {
    .init_allocator = pc_alloc_init_flags,
    .uninit_allocator = pc_alloc_uninit,
    .qpci_init = qpci_init_pc,
    .qpci_new = qpci_new_pc,
    .qpci_free = qpci_free_pc,
    .shutdown = qtest_pc_shutdown,
};
Loading