提交 637d72f9 编写于 作者: L Laine Stump

qemu_hotplug: make Detach functions called only from qemu_hotplug.c static

These are no longer called from qemu_driver.c, since the function that
called them (qemuDomainDetachDeviceLive()) has been moved to
qemu_hotplug.c, and they are no longer called from testqemuhotplug.c
because it now just called qemuDomainDetachDeviceLive() instead of all
the subordinate functions.
Signed-off-by: NLaine Stump <laine@laine.org>
ACKed-by: NPeter Krempa <pkrempa@redhat.com>
上级 d3aab990
......@@ -5369,7 +5369,7 @@ qemuFindDisk(virDomainDefPtr def, const char *dst)
return -1;
}
int
static int
qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
......@@ -5520,10 +5520,11 @@ static bool qemuDomainControllerIsBusy(virDomainObjPtr vm,
}
}
int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async)
static int
qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async)
{
int idx, ret = -1;
virDomainControllerDefPtr detach = NULL;
......@@ -5581,10 +5582,11 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
/* search for a hostdev matching dev and detach it */
int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async)
static int
qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async)
{
virDomainHostdevDefPtr hostdev = dev->data.hostdev;
virDomainHostdevSubsysPtr subsys = &hostdev->source.subsys;
......@@ -5696,7 +5698,7 @@ int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
}
int
static int
qemuDomainDetachShmemDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainShmemDefPtr dev,
......@@ -5750,7 +5752,7 @@ qemuDomainDetachShmemDevice(virQEMUDriverPtr driver,
}
int
static int
qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainWatchdogDefPtr dev,
......@@ -5805,7 +5807,7 @@ qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
}
int
static int
qemuDomainDetachRedirdevDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainRedirdevDefPtr dev,
......@@ -5849,7 +5851,7 @@ qemuDomainDetachRedirdevDevice(virQEMUDriverPtr driver,
}
int
static int
qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
......@@ -5915,10 +5917,11 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
}
int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainChrDefPtr chr,
bool async)
static int
qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainChrDefPtr chr,
bool async)
{
int ret = -1;
qemuDomainObjPrivatePtr priv = vm->privateData;
......@@ -5972,7 +5975,7 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
}
int
static int
qemuDomainDetachRNGDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainRNGDefPtr rng,
......@@ -6018,7 +6021,7 @@ qemuDomainDetachRNGDevice(virQEMUDriverPtr driver,
}
int
static int
qemuDomainDetachMemoryDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainMemoryDefPtr memdef,
......@@ -6066,7 +6069,7 @@ qemuDomainDetachMemoryDevice(virQEMUDriverPtr driver,
}
int
static int
qemuDomainDetachInputDevice(virDomainObjPtr vm,
virDomainInputDefPtr def,
bool async)
......@@ -6117,7 +6120,7 @@ qemuDomainDetachInputDevice(virDomainObjPtr vm,
}
int
static int
qemuDomainDetachVsockDevice(virDomainObjPtr vm,
virDomainVsockDefPtr dev,
bool async)
......@@ -6153,7 +6156,7 @@ qemuDomainDetachVsockDevice(virDomainObjPtr vm,
}
int
static int
qemuDomainDetachLease(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainLeaseDefPtr lease)
......
......@@ -79,10 +79,6 @@ int qemuDomainFindGraphicsIndex(virDomainDefPtr def,
int qemuDomainAttachMemory(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainMemoryDefPtr mem);
int qemuDomainDetachMemoryDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainMemoryDefPtr memdef,
bool async);
int qemuDomainChangeGraphics(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainGraphicsDefPtr dev);
......@@ -99,35 +95,6 @@ int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainNetDefPtr dev,
int linkstate);
int qemuDomainDetachDeviceDiskLive(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async);
int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async);
int qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async);
int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
bool async);
int qemuDomainDetachShmemDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainShmemDefPtr dev,
bool async);
int qemuDomainDetachWatchdog(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainWatchdogDefPtr watchdog,
bool async);
int qemuDomainDetachRedirdevDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainRedirdevDefPtr dev,
bool async);
int qemuDomainAttachInputDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
......@@ -140,23 +107,12 @@ int qemuDomainAttachVsockDevice(virQEMUDriverPtr driver,
int qemuDomainAttachLease(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainLeaseDefPtr lease);
int qemuDomainDetachLease(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainLeaseDefPtr lease);
int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainChrDefPtr chr);
int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainChrDefPtr chr,
bool async);
int qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainRNGDefPtr rng);
int qemuDomainDetachRNGDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainRNGDefPtr rng,
bool async);
int qemuDomainDetachDeviceLive(virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
......@@ -196,11 +152,4 @@ int qemuDomainSetVcpuInternal(virQEMUDriverPtr driver,
virBitmapPtr vcpus,
bool state);
int qemuDomainDetachInputDevice(virDomainObjPtr vm,
virDomainInputDefPtr def,
bool async);
int qemuDomainDetachVsockDevice(virDomainObjPtr vm,
virDomainVsockDefPtr dev,
bool async);
#endif /* LIBVIRT_QEMU_HOTPLUG_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册