mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03: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
|
@ -40,7 +40,8 @@ static void xen_init_pv(ram_addr_t ram_size,
|
|||
const char *cpu_model)
|
||||
{
|
||||
CPUState *env;
|
||||
int i, index;
|
||||
DriveInfo *dinfo;
|
||||
int i;
|
||||
|
||||
/* Initialize a dummy CPU */
|
||||
if (cpu_model == NULL) {
|
||||
|
@ -90,10 +91,10 @@ static void xen_init_pv(ram_addr_t ram_size,
|
|||
|
||||
/* configure disks */
|
||||
for (i = 0; i < 16; i++) {
|
||||
index = drive_get_index(IF_XEN, 0, i);
|
||||
if (index == -1)
|
||||
dinfo = drive_get(IF_XEN, 0, i);
|
||||
if (!dinfo)
|
||||
continue;
|
||||
xen_config_dev_blk(drives_table + index);
|
||||
xen_config_dev_blk(dinfo);
|
||||
}
|
||||
|
||||
/* configure nics */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue