mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
kill drives_table
First step cleaning up the drives handling. This one does nothing but removing drives_table[], still it became seriously big. drive_get_index() is gone and is replaced by drives_get() which hands out DriveInfo pointers instead of a table index. This needs adaption in *tons* of places all over. The drives are now maintained as linked list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
8a14daa5a1
commit
751c6a1704
36 changed files with 308 additions and 343 deletions
5
hw/r2d.c
5
hw/r2d.c
|
@ -203,6 +203,7 @@ static void r2d_init(ram_addr_t ram_size,
|
|||
ram_addr_t sdram_addr;
|
||||
qemu_irq *irq;
|
||||
PCIBus *pci;
|
||||
DriveInfo *dinfo;
|
||||
int i;
|
||||
|
||||
if (!cpu_model)
|
||||
|
@ -225,9 +226,9 @@ static void r2d_init(ram_addr_t ram_size,
|
|||
sm501_init(0x10000000, SM501_VRAM_SIZE, irq[SM501], serial_hds[2]);
|
||||
|
||||
/* onboard CF (True IDE mode, Master only). */
|
||||
if ((i = drive_get_index(IF_IDE, 0, 0)) != -1)
|
||||
if ((dinfo = drive_get(IF_IDE, 0, 0)) != NULL)
|
||||
mmio_ide_init(0x14001000, 0x1400080c, irq[CF_IDE], 1,
|
||||
drives_table[i].bdrv, NULL);
|
||||
dinfo->bdrv, NULL);
|
||||
|
||||
/* NIC: rtl8139 on-board, and 2 slots. */
|
||||
for (i = 0; i < nb_nics; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue