mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -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
|
@ -744,13 +744,13 @@ static void spitz_ssp_attach(PXA2xxState *cpu)
|
|||
static void spitz_microdrive_attach(PXA2xxState *cpu, int slot)
|
||||
{
|
||||
PCMCIACardState *md;
|
||||
int index;
|
||||
BlockDriverState *bs;
|
||||
DriveInfo *dinfo;
|
||||
|
||||
index = drive_get_index(IF_IDE, 0, 0);
|
||||
if (index == -1)
|
||||
dinfo = drive_get(IF_IDE, 0, 0);
|
||||
if (!dinfo)
|
||||
return;
|
||||
bs = drives_table[index].bdrv;
|
||||
bs = dinfo->bdrv;
|
||||
if (bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) {
|
||||
md = dscm1xxxx_init(bs);
|
||||
pxa2xx_pcmcia_attach(cpu->pcmcia[slot], md);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue