Revision 751c6a17 hw/ppc440_bamboo.c
b/hw/ppc440_bamboo.c | ||
---|---|---|
102 | 102 |
target_ulong dt_base = 0; |
103 | 103 |
void *fdt; |
104 | 104 |
int i; |
105 |
DriveInfo *dinfo; |
|
105 | 106 |
|
106 | 107 |
/* Setup CPU. */ |
107 | 108 |
env = ppc440ep_init(&ram_size, &pcibus, pci_irq_nrs, 1, cpu_model); |
... | ... | |
110 | 111 |
int unit_id = 0; |
111 | 112 |
|
112 | 113 |
/* Add virtio block devices. */ |
113 |
while ((i = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
|
|
114 |
pci_dev = pci_create("virtio-blk-pci", drives_table[i].devaddr);
|
|
114 |
while ((dinfo = drive_get(IF_VIRTIO, 0, unit_id)) != NULL) {
|
|
115 |
pci_dev = pci_create("virtio-blk-pci", dinfo->devaddr);
|
|
115 | 116 |
qdev_init(&pci_dev->qdev); |
116 | 117 |
unit_id++; |
117 | 118 |
} |
Also available in: Unified diff