mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
Clean up pci_drive_hot_add()'s use of BlockInterfaceType
pci_drive_hot_add() parameter type has the wrong type: int instead of BlockInterfaceType. It's actually redundant, so we can just drop it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
036f0f8356
commit
4dbd84e26f
3 changed files with 8 additions and 13 deletions
|
@ -111,15 +111,14 @@ static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
|
||||
DriveInfo *dinfo, int type)
|
||||
int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
|
||||
{
|
||||
int dom, pci_bus;
|
||||
unsigned slot;
|
||||
PCIDevice *dev;
|
||||
const char *pci_addr = qdict_get_str(qdict, "pci_addr");
|
||||
|
||||
switch (type) {
|
||||
switch (dinfo->type) {
|
||||
case IF_SCSI:
|
||||
if (pci_read_devaddr(mon, pci_addr, &dom, &pci_bus, &slot)) {
|
||||
goto err;
|
||||
|
@ -135,7 +134,7 @@ int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
|
||||
monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue