mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
Replace 'struct qemud_driver *' with virQEMUDriverPtr
Remove the obsolete 'qemud' naming prefix and underscore based type name. Introduce virQEMUDriverPtr as the replacement, in common with LXC driver naming style
This commit is contained in:
parent
012d69dff1
commit
4738c2a7e7
@ -34,7 +34,7 @@
|
||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||
|
||||
int
|
||||
networkAddEbtablesRules(struct qemud_driver *driver) {
|
||||
networkAddEbtablesRules(virQEMUDriverPtr driver) {
|
||||
int err;
|
||||
|
||||
/* Set forward policy to DROP */
|
||||
@ -50,7 +50,7 @@ networkAddEbtablesRules(struct qemud_driver *driver) {
|
||||
|
||||
|
||||
int
|
||||
networkDisableAllFrames(struct qemud_driver *driver) {
|
||||
networkDisableAllFrames(virQEMUDriverPtr driver) {
|
||||
int err;
|
||||
|
||||
/* add default rules */
|
||||
@ -64,7 +64,7 @@ networkDisableAllFrames(struct qemud_driver *driver) {
|
||||
}
|
||||
|
||||
int
|
||||
networkAllowMacOnPort(struct qemud_driver *driver,
|
||||
networkAllowMacOnPort(virQEMUDriverPtr driver,
|
||||
const char * ifname,
|
||||
const virMacAddrPtr mac) {
|
||||
|
||||
@ -85,7 +85,7 @@ networkAllowMacOnPort(struct qemud_driver *driver,
|
||||
|
||||
|
||||
int
|
||||
networkDisallowMacOnPort(struct qemud_driver *driver,
|
||||
networkDisallowMacOnPort(virQEMUDriverPtr driver,
|
||||
const char * ifname,
|
||||
const virMacAddrPtr mac) {
|
||||
|
||||
|
@ -24,14 +24,14 @@
|
||||
# define __QEMUD_BRIDGE_FILTER_H__
|
||||
|
||||
|
||||
int networkAllowMacOnPort(struct qemud_driver *driver,
|
||||
int networkAllowMacOnPort(virQEMUDriverPtr driver,
|
||||
const char * ifname,
|
||||
const virMacAddrPtr mac);
|
||||
int networkDisallowMacOnPort(struct qemud_driver *driver,
|
||||
int networkDisallowMacOnPort(virQEMUDriverPtr driver,
|
||||
const char * ifname,
|
||||
const virMacAddrPtr mac);
|
||||
int networkDisableAllFrames(struct qemud_driver *driver);
|
||||
int networkAddEbtablesRules(struct qemud_driver *driver);
|
||||
int networkDisableAllFrames(virQEMUDriverPtr driver);
|
||||
int networkAddEbtablesRules(virQEMUDriverPtr driver);
|
||||
|
||||
|
||||
#endif /* __QEMUD_BRIDGE_FILTER_H__ */
|
||||
|
@ -45,7 +45,7 @@ static const char *const defaultDeviceACL[] = {
|
||||
#define DEVICE_PTY_MAJOR 136
|
||||
#define DEVICE_SND_MAJOR 116
|
||||
|
||||
bool qemuCgroupControllerActive(struct qemud_driver *driver,
|
||||
bool qemuCgroupControllerActive(virQEMUDriverPtr driver,
|
||||
int controller)
|
||||
{
|
||||
if (driver->cgroup == NULL)
|
||||
@ -188,7 +188,7 @@ int qemuSetupHostUsbDeviceCgroup(usbDevice *dev ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int qemuSetupCgroup(struct qemud_driver *driver,
|
||||
int qemuSetupCgroup(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virBitmapPtr nodemask)
|
||||
{
|
||||
@ -532,7 +532,7 @@ cleanup:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int qemuSetupCgroupForVcpu(struct qemud_driver *driver, virDomainObjPtr vm)
|
||||
int qemuSetupCgroupForVcpu(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
virCgroupPtr cgroup_vcpu = NULL;
|
||||
@ -637,7 +637,7 @@ cleanup:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int qemuSetupCgroupForEmulator(struct qemud_driver *driver,
|
||||
int qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virBitmapPtr nodemask)
|
||||
{
|
||||
@ -738,7 +738,7 @@ cleanup:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int qemuRemoveCgroup(struct qemud_driver *driver,
|
||||
int qemuRemoveCgroup(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int quiet)
|
||||
{
|
||||
@ -762,7 +762,7 @@ int qemuRemoveCgroup(struct qemud_driver *driver,
|
||||
return rc;
|
||||
}
|
||||
|
||||
int qemuAddToCgroup(struct qemud_driver *driver,
|
||||
int qemuAddToCgroup(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
|
@ -34,7 +34,7 @@ struct _qemuCgroupData {
|
||||
};
|
||||
typedef struct _qemuCgroupData qemuCgroupData;
|
||||
|
||||
bool qemuCgroupControllerActive(struct qemud_driver *driver,
|
||||
bool qemuCgroupControllerActive(virQEMUDriverPtr driver,
|
||||
int controller);
|
||||
int qemuSetupDiskCgroup(virDomainObjPtr vm,
|
||||
virCgroupPtr cgroup,
|
||||
@ -45,7 +45,7 @@ int qemuTeardownDiskCgroup(virDomainObjPtr vm,
|
||||
int qemuSetupHostUsbDeviceCgroup(usbDevice *dev,
|
||||
const char *path,
|
||||
void *opaque);
|
||||
int qemuSetupCgroup(struct qemud_driver *driver,
|
||||
int qemuSetupCgroup(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virBitmapPtr nodemask);
|
||||
int qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
|
||||
@ -56,14 +56,14 @@ int qemuSetupCgroupVcpuPin(virCgroupPtr cgroup,
|
||||
int nvcpupin,
|
||||
int vcpuid);
|
||||
int qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup, virBitmapPtr cpumask);
|
||||
int qemuSetupCgroupForVcpu(struct qemud_driver *driver, virDomainObjPtr vm);
|
||||
int qemuSetupCgroupForEmulator(struct qemud_driver *driver,
|
||||
int qemuSetupCgroupForVcpu(virQEMUDriverPtr driver, virDomainObjPtr vm);
|
||||
int qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virBitmapPtr nodemask);
|
||||
int qemuRemoveCgroup(struct qemud_driver *driver,
|
||||
int qemuRemoveCgroup(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int quiet);
|
||||
int qemuAddToCgroup(struct qemud_driver *driver,
|
||||
int qemuAddToCgroup(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
|
||||
#endif /* __QEMU_CGROUP_H__ */
|
||||
|
@ -139,7 +139,7 @@ uname_normalize(struct utsname *ut)
|
||||
/**
|
||||
* qemuPhysIfaceConnect:
|
||||
* @def: the definition of the VM (needed by 802.1Qbh and audit)
|
||||
* @driver: pointer to the qemud_driver
|
||||
* @driver: pointer to the driver instance
|
||||
* @net: pointer to he VM's interface description with direct device type
|
||||
* @qemuCaps: flags for qemu
|
||||
* @vmop: VM operation type
|
||||
@ -148,7 +148,7 @@ uname_normalize(struct utsname *ut)
|
||||
*/
|
||||
int
|
||||
qemuPhysIfaceConnect(virDomainDefPtr def,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainNetDefPtr net,
|
||||
qemuCapsPtr caps,
|
||||
enum virNetDevVPortProfileOp vmop)
|
||||
@ -197,7 +197,7 @@ error:
|
||||
int
|
||||
qemuNetworkIfaceConnect(virDomainDefPtr def,
|
||||
virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainNetDefPtr net,
|
||||
qemuCapsPtr caps)
|
||||
{
|
||||
@ -3197,7 +3197,7 @@ error:
|
||||
|
||||
char *
|
||||
qemuBuildHostNetStr(virDomainNetDefPtr net,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
qemuCapsPtr caps,
|
||||
char type_sep,
|
||||
int vlan,
|
||||
@ -4242,7 +4242,7 @@ error:
|
||||
|
||||
|
||||
static int
|
||||
qemuBuildCpuArgStr(const struct qemud_driver *driver,
|
||||
qemuBuildCpuArgStr(const virQEMUDriverPtr driver,
|
||||
const virDomainDefPtr def,
|
||||
const char *emulator,
|
||||
qemuCapsPtr caps,
|
||||
@ -4571,7 +4571,7 @@ error:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuBuildGraphicsCommandLine(struct qemud_driver *driver,
|
||||
qemuBuildGraphicsCommandLine(virQEMUDriverPtr driver,
|
||||
virCommandPtr cmd,
|
||||
virDomainDefPtr def,
|
||||
qemuCapsPtr caps,
|
||||
@ -4913,7 +4913,7 @@ error:
|
||||
*/
|
||||
virCommandPtr
|
||||
qemuBuildCommandLine(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
virDomainChrSourceDefPtr monitor_chr,
|
||||
bool monitor_json,
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
|
||||
virCommandPtr qemuBuildCommandLine(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
virDomainChrSourceDefPtr monitor_chr,
|
||||
bool monitor_json,
|
||||
@ -70,7 +70,7 @@ qemuBuildChrDeviceStr (virDomainChrDefPtr serial,
|
||||
|
||||
/* With vlan == -1, use netdev syntax, else old hostnet */
|
||||
char * qemuBuildHostNetStr(virDomainNetDefPtr net,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
qemuCapsPtr caps,
|
||||
char type_sep,
|
||||
int vlan,
|
||||
@ -146,13 +146,13 @@ char * qemuBuildRedirdevDevStr(virDomainDefPtr def,
|
||||
|
||||
int qemuNetworkIfaceConnect(virDomainDefPtr def,
|
||||
virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainNetDefPtr net,
|
||||
qemuCapsPtr caps)
|
||||
ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int qemuPhysIfaceConnect(virDomainDefPtr def,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainNetDefPtr net,
|
||||
qemuCapsPtr caps,
|
||||
enum virNetDevVPortProfileOp vmop);
|
||||
|
@ -62,17 +62,17 @@ struct _qemuDriverCloseDef {
|
||||
qemuDriverCloseCallback cb;
|
||||
};
|
||||
|
||||
void qemuDriverLock(struct qemud_driver *driver)
|
||||
void qemuDriverLock(virQEMUDriverPtr driver)
|
||||
{
|
||||
virMutexLock(&driver->lock);
|
||||
}
|
||||
void qemuDriverUnlock(struct qemud_driver *driver)
|
||||
void qemuDriverUnlock(virQEMUDriverPtr driver)
|
||||
{
|
||||
virMutexUnlock(&driver->lock);
|
||||
}
|
||||
|
||||
|
||||
int qemuLoadDriverConfig(struct qemud_driver *driver,
|
||||
int qemuLoadDriverConfig(virQEMUDriverPtr driver,
|
||||
const char *filename) {
|
||||
virConfPtr conf;
|
||||
virConfValuePtr p;
|
||||
@ -587,7 +587,7 @@ qemuDriverCloseCallbackFree(void *payload,
|
||||
}
|
||||
|
||||
int
|
||||
qemuDriverCloseCallbackInit(struct qemud_driver *driver)
|
||||
qemuDriverCloseCallbackInit(virQEMUDriverPtr driver)
|
||||
{
|
||||
driver->closeCallbacks = virHashCreate(5, qemuDriverCloseCallbackFree);
|
||||
if (!driver->closeCallbacks)
|
||||
@ -597,13 +597,13 @@ qemuDriverCloseCallbackInit(struct qemud_driver *driver)
|
||||
}
|
||||
|
||||
void
|
||||
qemuDriverCloseCallbackShutdown(struct qemud_driver *driver)
|
||||
qemuDriverCloseCallbackShutdown(virQEMUDriverPtr driver)
|
||||
{
|
||||
virHashFree(driver->closeCallbacks);
|
||||
}
|
||||
|
||||
int
|
||||
qemuDriverCloseCallbackSet(struct qemud_driver *driver,
|
||||
qemuDriverCloseCallbackSet(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn,
|
||||
qemuDriverCloseCallback cb)
|
||||
@ -649,7 +649,7 @@ qemuDriverCloseCallbackSet(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
int
|
||||
qemuDriverCloseCallbackUnset(struct qemud_driver *driver,
|
||||
qemuDriverCloseCallbackUnset(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
qemuDriverCloseCallback cb)
|
||||
{
|
||||
@ -675,7 +675,7 @@ qemuDriverCloseCallbackUnset(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
qemuDriverCloseCallback
|
||||
qemuDriverCloseCallbackGet(struct qemud_driver *driver,
|
||||
qemuDriverCloseCallbackGet(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn)
|
||||
{
|
||||
@ -696,7 +696,7 @@ qemuDriverCloseCallbackGet(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
struct qemuDriverCloseCallbackData {
|
||||
struct qemud_driver *driver;
|
||||
virQEMUDriverPtr driver;
|
||||
virConnectPtr conn;
|
||||
};
|
||||
|
||||
@ -735,7 +735,7 @@ qemuDriverCloseCallbackRun(void *payload,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDriverCloseCallbackRunAll(struct qemud_driver *driver,
|
||||
qemuDriverCloseCallbackRunAll(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn)
|
||||
{
|
||||
struct qemuDriverCloseCallbackData data = {
|
||||
|
@ -50,8 +50,11 @@
|
||||
typedef struct _qemuDriverCloseDef qemuDriverCloseDef;
|
||||
typedef qemuDriverCloseDef *qemuDriverCloseDefPtr;
|
||||
|
||||
typedef struct _virQEMUDriver virQEMUDriver;
|
||||
typedef virQEMUDriver *virQEMUDriverPtr;
|
||||
|
||||
/* Main driver state */
|
||||
struct qemud_driver {
|
||||
struct _virQEMUDriver {
|
||||
virMutex lock;
|
||||
|
||||
virThreadPoolPtr workerPool;
|
||||
@ -174,9 +177,9 @@ struct _qemuDomainCmdlineDef {
|
||||
# define QEMUD_MIGRATION_NUM_PORTS 64
|
||||
|
||||
|
||||
void qemuDriverLock(struct qemud_driver *driver);
|
||||
void qemuDriverUnlock(struct qemud_driver *driver);
|
||||
int qemuLoadDriverConfig(struct qemud_driver *driver,
|
||||
void qemuDriverLock(virQEMUDriverPtr driver);
|
||||
void qemuDriverUnlock(virQEMUDriverPtr driver);
|
||||
int qemuLoadDriverConfig(virQEMUDriverPtr driver,
|
||||
const char *filename);
|
||||
|
||||
struct qemuDomainDiskInfo {
|
||||
@ -186,22 +189,22 @@ struct qemuDomainDiskInfo {
|
||||
int io_status;
|
||||
};
|
||||
|
||||
typedef virDomainObjPtr (*qemuDriverCloseCallback)(struct qemud_driver *driver,
|
||||
typedef virDomainObjPtr (*qemuDriverCloseCallback)(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn);
|
||||
int qemuDriverCloseCallbackInit(struct qemud_driver *driver);
|
||||
void qemuDriverCloseCallbackShutdown(struct qemud_driver *driver);
|
||||
int qemuDriverCloseCallbackSet(struct qemud_driver *driver,
|
||||
int qemuDriverCloseCallbackInit(virQEMUDriverPtr driver);
|
||||
void qemuDriverCloseCallbackShutdown(virQEMUDriverPtr driver);
|
||||
int qemuDriverCloseCallbackSet(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn,
|
||||
qemuDriverCloseCallback cb);
|
||||
int qemuDriverCloseCallbackUnset(struct qemud_driver *driver,
|
||||
int qemuDriverCloseCallbackUnset(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
qemuDriverCloseCallback cb);
|
||||
qemuDriverCloseCallback qemuDriverCloseCallbackGet(struct qemud_driver *driver,
|
||||
qemuDriverCloseCallback qemuDriverCloseCallbackGet(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn);
|
||||
void qemuDriverCloseCallbackRunAll(struct qemud_driver *driver,
|
||||
void qemuDriverCloseCallbackRunAll(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn);
|
||||
|
||||
#endif /* __QEMUD_CONF_H */
|
||||
|
@ -117,7 +117,7 @@ qemuDomainAsyncJobPhaseFromString(enum qemuDomainAsyncJob job,
|
||||
|
||||
|
||||
/* driver must be locked before calling */
|
||||
void qemuDomainEventQueue(struct qemud_driver *driver,
|
||||
void qemuDomainEventQueue(virQEMUDriverPtr driver,
|
||||
virDomainEventPtr event)
|
||||
{
|
||||
virDomainEventStateQueue(driver->domainEventState, event);
|
||||
@ -661,7 +661,7 @@ void qemuDomainSetNamespaceHooks(virCapsPtr caps)
|
||||
}
|
||||
|
||||
static void
|
||||
qemuDomainObjSaveJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
||||
qemuDomainObjSaveJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||
{
|
||||
if (!virDomainObjIsActive(obj)) {
|
||||
/* don't write the state file yet, it will be written once the domain
|
||||
@ -674,7 +674,7 @@ qemuDomainObjSaveJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainObjSetJobPhase(struct qemud_driver *driver,
|
||||
qemuDomainObjSetJobPhase(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
int phase)
|
||||
{
|
||||
@ -712,7 +712,7 @@ qemuDomainObjSetAsyncJobMask(virDomainObjPtr obj,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainObjDiscardAsyncJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
||||
qemuDomainObjDiscardAsyncJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = obj->privateData;
|
||||
|
||||
@ -758,7 +758,7 @@ qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv, enum qemuDomainJob job)
|
||||
* locked or not.
|
||||
*/
|
||||
static int ATTRIBUTE_NONNULL(1)
|
||||
qemuDomainObjBeginJobInternal(struct qemud_driver *driver,
|
||||
qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
|
||||
bool driver_locked,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainJob job,
|
||||
@ -860,7 +860,7 @@ error:
|
||||
}
|
||||
|
||||
/*
|
||||
* obj must be locked before calling, qemud_driver must NOT be locked
|
||||
* obj must be locked before calling, driver must NOT be locked
|
||||
*
|
||||
* This must be called by anything that will change the VM state
|
||||
* in any way, or anything that will use the QEMU monitor.
|
||||
@ -868,7 +868,7 @@ error:
|
||||
* Upon successful return, the object will have its ref count increased,
|
||||
* successful calls must be followed by EndJob eventually
|
||||
*/
|
||||
int qemuDomainObjBeginJob(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainJob job)
|
||||
{
|
||||
@ -876,7 +876,7 @@ int qemuDomainObjBeginJob(struct qemud_driver *driver,
|
||||
QEMU_ASYNC_JOB_NONE);
|
||||
}
|
||||
|
||||
int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginAsyncJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
@ -885,7 +885,7 @@ int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
/*
|
||||
* obj and qemud_driver must be locked before calling.
|
||||
* obj and driver must be locked before calling.
|
||||
*
|
||||
* This must be called by anything that will change the VM state
|
||||
* in any way, or anything that will use the QEMU monitor.
|
||||
@ -893,7 +893,7 @@ int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
||||
* Upon successful return, the object will have its ref count increased,
|
||||
* successful calls must be followed by EndJob eventually
|
||||
*/
|
||||
int qemuDomainObjBeginJobWithDriver(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginJobWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainJob job)
|
||||
{
|
||||
@ -907,7 +907,7 @@ int qemuDomainObjBeginJobWithDriver(struct qemud_driver *driver,
|
||||
QEMU_ASYNC_JOB_NONE);
|
||||
}
|
||||
|
||||
int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginAsyncJobWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
@ -916,7 +916,7 @@ int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
/*
|
||||
* obj must be locked before calling, qemud_driver does not matter
|
||||
* obj must be locked before calling, driver does not matter
|
||||
*
|
||||
* To be called after completing the work associated with the
|
||||
* earlier qemuDomainBeginJob() call
|
||||
@ -924,7 +924,7 @@ int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
||||
* Returns true if @obj was still referenced, false if it was
|
||||
* disposed of.
|
||||
*/
|
||||
bool qemuDomainObjEndJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
||||
bool qemuDomainObjEndJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = obj->privateData;
|
||||
enum qemuDomainJob job = priv->job.active;
|
||||
@ -944,7 +944,7 @@ bool qemuDomainObjEndJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
||||
}
|
||||
|
||||
bool
|
||||
qemuDomainObjEndAsyncJob(struct qemud_driver *driver, virDomainObjPtr obj)
|
||||
qemuDomainObjEndAsyncJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = obj->privateData;
|
||||
|
||||
@ -972,7 +972,7 @@ qemuDomainObjAbortAsyncJob(virDomainObjPtr obj)
|
||||
}
|
||||
|
||||
static int
|
||||
qemuDomainObjEnterMonitorInternal(struct qemud_driver *driver,
|
||||
qemuDomainObjEnterMonitorInternal(virQEMUDriverPtr driver,
|
||||
bool driver_locked,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
@ -1015,7 +1015,7 @@ qemuDomainObjEnterMonitorInternal(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
static void ATTRIBUTE_NONNULL(1)
|
||||
qemuDomainObjExitMonitorInternal(struct qemud_driver *driver,
|
||||
qemuDomainObjExitMonitorInternal(virQEMUDriverPtr driver,
|
||||
bool driver_locked,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
@ -1045,7 +1045,7 @@ qemuDomainObjExitMonitorInternal(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
/*
|
||||
* obj must be locked before calling, qemud_driver must be unlocked
|
||||
* obj must be locked before calling, driver must be unlocked
|
||||
*
|
||||
* To be called immediately before any QEMU monitor API call
|
||||
* Must have already either called qemuDomainObjBeginJob() and checked
|
||||
@ -1053,25 +1053,25 @@ qemuDomainObjExitMonitorInternal(struct qemud_driver *driver,
|
||||
*
|
||||
* To be followed with qemuDomainObjExitMonitor() once complete
|
||||
*/
|
||||
void qemuDomainObjEnterMonitor(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterMonitor(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
ignore_value(qemuDomainObjEnterMonitorInternal(driver, false, obj,
|
||||
QEMU_ASYNC_JOB_NONE));
|
||||
}
|
||||
|
||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked
|
||||
/* obj must NOT be locked before calling, driver must be unlocked
|
||||
*
|
||||
* Should be paired with an earlier qemuDomainObjEnterMonitor() call
|
||||
*/
|
||||
void qemuDomainObjExitMonitor(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitMonitor(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
qemuDomainObjExitMonitorInternal(driver, false, obj);
|
||||
}
|
||||
|
||||
/*
|
||||
* obj must be locked before calling, qemud_driver must be locked
|
||||
* obj must be locked before calling, driver must be locked
|
||||
*
|
||||
* To be called immediately before any QEMU monitor API call
|
||||
* Must have already either called qemuDomainObjBeginJobWithDriver() and
|
||||
@ -1079,7 +1079,7 @@ void qemuDomainObjExitMonitor(struct qemud_driver *driver,
|
||||
*
|
||||
* To be followed with qemuDomainObjExitMonitorWithDriver() once complete
|
||||
*/
|
||||
void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterMonitorWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
ignore_value(qemuDomainObjEnterMonitorInternal(driver, true, obj,
|
||||
@ -1087,7 +1087,7 @@ void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
/*
|
||||
* obj and qemud_driver must be locked before calling
|
||||
* obj and driver must be locked before calling
|
||||
*
|
||||
* To be called immediately before any QEMU monitor API call.
|
||||
* Must have already either called qemuDomainObjBeginJobWithDriver()
|
||||
@ -1100,19 +1100,19 @@ void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
||||
* started (probably because the vm exited in the meantime).
|
||||
*/
|
||||
int
|
||||
qemuDomainObjEnterMonitorAsync(struct qemud_driver *driver,
|
||||
qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
return qemuDomainObjEnterMonitorInternal(driver, true, obj, asyncJob);
|
||||
}
|
||||
|
||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked,
|
||||
/* obj must NOT be locked before calling, driver must be unlocked,
|
||||
* and will be locked after returning
|
||||
*
|
||||
* Should be paired with an earlier qemuDomainObjEnterMonitorWithDriver() call
|
||||
*/
|
||||
void qemuDomainObjExitMonitorWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitMonitorWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
qemuDomainObjExitMonitorInternal(driver, true, obj);
|
||||
@ -1121,7 +1121,7 @@ void qemuDomainObjExitMonitorWithDriver(struct qemud_driver *driver,
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainObjEnterAgentInternal(struct qemud_driver *driver,
|
||||
qemuDomainObjEnterAgentInternal(virQEMUDriverPtr driver,
|
||||
bool driver_locked,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
@ -1138,7 +1138,7 @@ qemuDomainObjEnterAgentInternal(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
static void ATTRIBUTE_NONNULL(1)
|
||||
qemuDomainObjExitAgentInternal(struct qemud_driver *driver,
|
||||
qemuDomainObjExitAgentInternal(virQEMUDriverPtr driver,
|
||||
bool driver_locked,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
@ -1160,7 +1160,7 @@ qemuDomainObjExitAgentInternal(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
/*
|
||||
* obj must be locked before calling, qemud_driver must be unlocked
|
||||
* obj must be locked before calling, driver must be unlocked
|
||||
*
|
||||
* To be called immediately before any QEMU agent API call.
|
||||
* Must have already called qemuDomainObjBeginJob() and checked
|
||||
@ -1168,24 +1168,24 @@ qemuDomainObjExitAgentInternal(struct qemud_driver *driver,
|
||||
*
|
||||
* To be followed with qemuDomainObjExitAgent() once complete
|
||||
*/
|
||||
void qemuDomainObjEnterAgent(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterAgent(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
ignore_value(qemuDomainObjEnterAgentInternal(driver, false, obj));
|
||||
}
|
||||
|
||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked
|
||||
/* obj must NOT be locked before calling, driver must be unlocked
|
||||
*
|
||||
* Should be paired with an earlier qemuDomainObjEnterAgent() call
|
||||
*/
|
||||
void qemuDomainObjExitAgent(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitAgent(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
qemuDomainObjExitAgentInternal(driver, false, obj);
|
||||
}
|
||||
|
||||
/*
|
||||
* obj must be locked before calling, qemud_driver must be locked
|
||||
* obj must be locked before calling, driver must be locked
|
||||
*
|
||||
* To be called immediately before any QEMU agent API call.
|
||||
* Must have already called qemuDomainObjBeginJobWithDriver() and
|
||||
@ -1193,24 +1193,24 @@ void qemuDomainObjExitAgent(struct qemud_driver *driver,
|
||||
*
|
||||
* To be followed with qemuDomainObjExitAgentWithDriver() once complete
|
||||
*/
|
||||
void qemuDomainObjEnterAgentWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterAgentWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
ignore_value(qemuDomainObjEnterAgentInternal(driver, true, obj));
|
||||
}
|
||||
|
||||
/* obj must NOT be locked before calling, qemud_driver must be unlocked,
|
||||
/* obj must NOT be locked before calling, driver must be unlocked,
|
||||
* and will be locked after returning
|
||||
*
|
||||
* Should be paired with an earlier qemuDomainObjEnterAgentWithDriver() call
|
||||
*/
|
||||
void qemuDomainObjExitAgentWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitAgentWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
qemuDomainObjExitAgentInternal(driver, true, obj);
|
||||
}
|
||||
|
||||
void qemuDomainObjEnterRemoteWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterRemoteWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
virObjectRef(obj);
|
||||
@ -1218,7 +1218,7 @@ void qemuDomainObjEnterRemoteWithDriver(struct qemud_driver *driver,
|
||||
qemuDriverUnlock(driver);
|
||||
}
|
||||
|
||||
void qemuDomainObjExitRemoteWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitRemoteWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
{
|
||||
qemuDriverLock(driver);
|
||||
@ -1228,7 +1228,7 @@ void qemuDomainObjExitRemoteWithDriver(struct qemud_driver *driver,
|
||||
|
||||
|
||||
int
|
||||
qemuDomainDefFormatBuf(struct qemud_driver *driver,
|
||||
qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
unsigned int flags,
|
||||
virBuffer *buf)
|
||||
@ -1307,7 +1307,7 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *qemuDomainDefFormatXML(struct qemud_driver *driver,
|
||||
char *qemuDomainDefFormatXML(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
unsigned int flags)
|
||||
{
|
||||
@ -1327,7 +1327,7 @@ char *qemuDomainDefFormatXML(struct qemud_driver *driver,
|
||||
return virBufferContentAndReset(&buf);
|
||||
}
|
||||
|
||||
char *qemuDomainFormatXML(struct qemud_driver *driver,
|
||||
char *qemuDomainFormatXML(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
unsigned int flags)
|
||||
{
|
||||
@ -1342,7 +1342,7 @@ char *qemuDomainFormatXML(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
char *
|
||||
qemuDomainDefFormatLive(struct qemud_driver *driver,
|
||||
qemuDomainDefFormatLive(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
bool inactive,
|
||||
bool compatible)
|
||||
@ -1358,7 +1358,7 @@ qemuDomainDefFormatLive(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
void qemuDomainObjTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum virDomainTaintFlags taint,
|
||||
int logFD)
|
||||
@ -1392,7 +1392,7 @@ void qemuDomainObjTaint(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
void qemuDomainObjCheckTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
int logFD)
|
||||
{
|
||||
@ -1421,7 +1421,7 @@ void qemuDomainObjCheckTaint(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
void qemuDomainObjCheckDiskTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
virDomainDiskDefPtr disk,
|
||||
int logFD)
|
||||
@ -1435,7 +1435,7 @@ void qemuDomainObjCheckDiskTaint(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
void qemuDomainObjCheckNetTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjCheckNetTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
virDomainNetDefPtr net,
|
||||
int logFD)
|
||||
@ -1451,7 +1451,7 @@ void qemuDomainObjCheckNetTaint(struct qemud_driver *driver,
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainOpenLogHelper(struct qemud_driver *driver,
|
||||
qemuDomainOpenLogHelper(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int oflags,
|
||||
mode_t mode)
|
||||
@ -1500,7 +1500,7 @@ cleanup:
|
||||
|
||||
|
||||
int
|
||||
qemuDomainCreateLog(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
qemuDomainCreateLog(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
bool append)
|
||||
{
|
||||
int oflags;
|
||||
@ -1517,7 +1517,7 @@ qemuDomainCreateLog(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
|
||||
|
||||
int
|
||||
qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos)
|
||||
qemuDomainOpenLog(virQEMUDriverPtr driver, virDomainObjPtr vm, off_t pos)
|
||||
{
|
||||
int fd;
|
||||
off_t off;
|
||||
@ -1550,7 +1550,7 @@ qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos)
|
||||
}
|
||||
|
||||
|
||||
int qemuDomainAppendLog(struct qemud_driver *driver,
|
||||
int qemuDomainAppendLog(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
int logFD,
|
||||
const char *fmt, ...)
|
||||
@ -1590,7 +1590,7 @@ cleanup:
|
||||
|
||||
/* Locate an appropriate 'qemu-img' binary. */
|
||||
const char *
|
||||
qemuFindQemuImgBinary(struct qemud_driver *driver)
|
||||
qemuFindQemuImgBinary(virQEMUDriverPtr driver)
|
||||
{
|
||||
if (!driver->qemuImgBinary) {
|
||||
driver->qemuImgBinary = virFindFileInPath("kvm-img");
|
||||
@ -1648,7 +1648,7 @@ cleanup:
|
||||
/* The domain is expected to be locked and inactive. Return -1 on normal
|
||||
* failure, 1 if we skipped a disk due to try_all. */
|
||||
static int
|
||||
qemuDomainSnapshotForEachQcow2Raw(struct qemud_driver *driver,
|
||||
qemuDomainSnapshotForEachQcow2Raw(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
const char *name,
|
||||
const char *op,
|
||||
@ -1719,7 +1719,7 @@ qemuDomainSnapshotForEachQcow2Raw(struct qemud_driver *driver,
|
||||
/* The domain is expected to be locked and inactive. Return -1 on normal
|
||||
* failure, 1 if we skipped a disk due to try_all. */
|
||||
int
|
||||
qemuDomainSnapshotForEachQcow2(struct qemud_driver *driver,
|
||||
qemuDomainSnapshotForEachQcow2(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainSnapshotObjPtr snap,
|
||||
const char *op,
|
||||
@ -1738,7 +1738,7 @@ qemuDomainSnapshotForEachQcow2(struct qemud_driver *driver,
|
||||
|
||||
/* Discard one snapshot (or its metadata), without reparenting any children. */
|
||||
int
|
||||
qemuDomainSnapshotDiscard(struct qemud_driver *driver,
|
||||
qemuDomainSnapshotDiscard(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainSnapshotObjPtr snap,
|
||||
bool update_current,
|
||||
@ -1821,7 +1821,7 @@ void qemuDomainSnapshotDiscardAll(void *payload,
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainSnapshotDiscardAllMetadata(struct qemud_driver *driver,
|
||||
qemuDomainSnapshotDiscardAllMetadata(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemu_snap_remove rem;
|
||||
@ -1841,7 +1841,7 @@ qemuDomainSnapshotDiscardAllMetadata(struct qemud_driver *driver,
|
||||
* be no remaining references to vm.
|
||||
*/
|
||||
void
|
||||
qemuDomainRemoveInactive(struct qemud_driver *driver,
|
||||
qemuDomainRemoveInactive(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
char *snapDir;
|
||||
@ -1864,7 +1864,7 @@ qemuDomainRemoveInactive(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainSetFakeReboot(struct qemud_driver *driver,
|
||||
qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
bool value)
|
||||
{
|
||||
@ -1880,7 +1880,7 @@ qemuDomainSetFakeReboot(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainCheckDiskPresence(struct qemud_driver *driver,
|
||||
qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
bool cold_boot)
|
||||
{
|
||||
@ -2002,7 +2002,7 @@ qemuDomainCleanupRemove(virDomainObjPtr vm,
|
||||
}
|
||||
|
||||
void
|
||||
qemuDomainCleanupRun(struct qemud_driver *driver,
|
||||
qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
@ -2022,7 +2022,7 @@ qemuDomainCleanupRun(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainDetermineDiskChain(struct qemud_driver *driver,
|
||||
qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
||||
virDomainDiskDefPtr disk,
|
||||
bool force)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ struct qemuDomainJobObj {
|
||||
typedef struct _qemuDomainPCIAddressSet qemuDomainPCIAddressSet;
|
||||
typedef qemuDomainPCIAddressSet *qemuDomainPCIAddressSetPtr;
|
||||
|
||||
typedef void (*qemuDomainCleanupCallback)(struct qemud_driver *driver,
|
||||
typedef void (*qemuDomainCleanupCallback)(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm);
|
||||
|
||||
typedef struct _qemuDomainObjPrivate qemuDomainObjPrivate;
|
||||
@ -176,37 +176,37 @@ int qemuDomainAsyncJobPhaseFromString(enum qemuDomainAsyncJob job,
|
||||
void qemuDomainEventFlush(int timer, void *opaque);
|
||||
|
||||
/* driver must be locked before calling */
|
||||
void qemuDomainEventQueue(struct qemud_driver *driver,
|
||||
void qemuDomainEventQueue(virQEMUDriverPtr driver,
|
||||
virDomainEventPtr event);
|
||||
|
||||
void qemuDomainSetPrivateDataHooks(virCapsPtr caps);
|
||||
void qemuDomainSetNamespaceHooks(virCapsPtr caps);
|
||||
|
||||
int qemuDomainObjBeginJob(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainJob job)
|
||||
ATTRIBUTE_RETURN_CHECK;
|
||||
int qemuDomainObjBeginAsyncJob(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginAsyncJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
ATTRIBUTE_RETURN_CHECK;
|
||||
int qemuDomainObjBeginJobWithDriver(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginJobWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainJob job)
|
||||
ATTRIBUTE_RETURN_CHECK;
|
||||
int qemuDomainObjBeginAsyncJobWithDriver(struct qemud_driver *driver,
|
||||
int qemuDomainObjBeginAsyncJobWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
bool qemuDomainObjEndJob(struct qemud_driver *driver,
|
||||
bool qemuDomainObjEndJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_RETURN_CHECK;
|
||||
bool qemuDomainObjEndAsyncJob(struct qemud_driver *driver,
|
||||
bool qemuDomainObjEndAsyncJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_RETURN_CHECK;
|
||||
void qemuDomainObjAbortAsyncJob(virDomainObjPtr obj);
|
||||
void qemuDomainObjSetJobPhase(struct qemud_driver *driver,
|
||||
void qemuDomainObjSetJobPhase(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
int phase);
|
||||
void qemuDomainObjSetAsyncJobMask(virDomainObjPtr obj,
|
||||
@ -214,112 +214,112 @@ void qemuDomainObjSetAsyncJobMask(virDomainObjPtr obj,
|
||||
void qemuDomainObjRestoreJob(virDomainObjPtr obj,
|
||||
struct qemuDomainJobObj *job);
|
||||
void qemuDomainObjTransferJob(virDomainObjPtr obj);
|
||||
void qemuDomainObjDiscardAsyncJob(struct qemud_driver *driver,
|
||||
void qemuDomainObjDiscardAsyncJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj);
|
||||
void qemuDomainObjReleaseAsyncJob(virDomainObjPtr obj);
|
||||
|
||||
void qemuDomainObjEnterMonitor(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterMonitor(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void qemuDomainObjExitMonitor(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitMonitor(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void qemuDomainObjEnterMonitorWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterMonitorWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
int qemuDomainObjEnterMonitorAsync(struct qemud_driver *driver,
|
||||
int qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
void qemuDomainObjExitMonitorWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitMonitorWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
|
||||
void qemuDomainObjEnterAgent(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterAgent(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void qemuDomainObjExitAgent(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitAgent(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void qemuDomainObjEnterAgentWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterAgentWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void qemuDomainObjExitAgentWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitAgentWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
|
||||
void qemuDomainObjEnterRemoteWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjEnterRemoteWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void qemuDomainObjExitRemoteWithDriver(struct qemud_driver *driver,
|
||||
void qemuDomainObjExitRemoteWithDriver(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int qemuDomainDefFormatBuf(struct qemud_driver *driver,
|
||||
int qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr vm,
|
||||
unsigned int flags,
|
||||
virBuffer *buf);
|
||||
|
||||
char *qemuDomainDefFormatXML(struct qemud_driver *driver,
|
||||
char *qemuDomainDefFormatXML(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr vm,
|
||||
unsigned int flags);
|
||||
|
||||
char *qemuDomainFormatXML(struct qemud_driver *driver,
|
||||
char *qemuDomainFormatXML(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
unsigned int flags);
|
||||
|
||||
char *qemuDomainDefFormatLive(struct qemud_driver *driver,
|
||||
char *qemuDomainDefFormatLive(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
bool inactive,
|
||||
bool compatible);
|
||||
|
||||
void qemuDomainObjTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
enum virDomainTaintFlags taint,
|
||||
int logFD);
|
||||
|
||||
void qemuDomainObjCheckTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
int logFD);
|
||||
void qemuDomainObjCheckDiskTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
virDomainDiskDefPtr disk,
|
||||
int logFD);
|
||||
void qemuDomainObjCheckNetTaint(struct qemud_driver *driver,
|
||||
void qemuDomainObjCheckNetTaint(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr obj,
|
||||
virDomainNetDefPtr net,
|
||||
int logFD);
|
||||
|
||||
|
||||
int qemuDomainCreateLog(struct qemud_driver *driver, virDomainObjPtr vm, bool append);
|
||||
int qemuDomainOpenLog(struct qemud_driver *driver, virDomainObjPtr vm, off_t pos);
|
||||
int qemuDomainAppendLog(struct qemud_driver *driver,
|
||||
int qemuDomainCreateLog(virQEMUDriverPtr driver, virDomainObjPtr vm, bool append);
|
||||
int qemuDomainOpenLog(virQEMUDriverPtr driver, virDomainObjPtr vm, off_t pos);
|
||||
int qemuDomainAppendLog(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int logFD,
|
||||
const char *fmt, ...) ATTRIBUTE_FMT_PRINTF(4, 5);
|
||||
|
||||
const char *qemuFindQemuImgBinary(struct qemud_driver *driver);
|
||||
const char *qemuFindQemuImgBinary(virQEMUDriverPtr driver);
|
||||
|
||||
int qemuDomainSnapshotWriteMetadata(virDomainObjPtr vm,
|
||||
virDomainSnapshotObjPtr snapshot,
|
||||
char *snapshotDir);
|
||||
|
||||
int qemuDomainSnapshotForEachQcow2(struct qemud_driver *driver,
|
||||
int qemuDomainSnapshotForEachQcow2(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainSnapshotObjPtr snap,
|
||||
const char *op,
|
||||
bool try_all);
|
||||
|
||||
int qemuDomainSnapshotDiscard(struct qemud_driver *driver,
|
||||
int qemuDomainSnapshotDiscard(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainSnapshotObjPtr snap,
|
||||
bool update_current,
|
||||
bool metadata_only);
|
||||
|
||||
struct qemu_snap_remove {
|
||||
struct qemud_driver *driver;
|
||||
virQEMUDriverPtr driver;
|
||||
virDomainObjPtr vm;
|
||||
int err;
|
||||
bool metadata_only;
|
||||
@ -330,23 +330,23 @@ void qemuDomainSnapshotDiscardAll(void *payload,
|
||||
const void *name,
|
||||
void *data);
|
||||
|
||||
int qemuDomainSnapshotDiscardAllMetadata(struct qemud_driver *driver,
|
||||
int qemuDomainSnapshotDiscardAllMetadata(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm);
|
||||
|
||||
void qemuDomainRemoveInactive(struct qemud_driver *driver,
|
||||
void qemuDomainRemoveInactive(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm);
|
||||
|
||||
void qemuDomainSetFakeReboot(struct qemud_driver *driver,
|
||||
void qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
bool value);
|
||||
|
||||
bool qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv,
|
||||
enum qemuDomainJob job);
|
||||
|
||||
int qemuDomainCheckDiskPresence(struct qemud_driver *driver,
|
||||
int qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
bool start_with_state);
|
||||
int qemuDomainDetermineDiskChain(struct qemud_driver *driver,
|
||||
int qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
||||
virDomainDiskDefPtr disk,
|
||||
bool force);
|
||||
|
||||
@ -354,7 +354,7 @@ int qemuDomainCleanupAdd(virDomainObjPtr vm,
|
||||
qemuDomainCleanupCallback cb);
|
||||
void qemuDomainCleanupRemove(virDomainObjPtr vm,
|
||||
qemuDomainCleanupCallback cb);
|
||||
void qemuDomainCleanupRun(struct qemud_driver *driver,
|
||||
void qemuDomainCleanupRun(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm);
|
||||
|
||||
#endif /* __QEMU_DOMAIN_H__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -73,7 +73,7 @@ qemuGetPciHostDeviceList(virDomainHostdevDefPtr *hostdevs, int nhostdevs)
|
||||
}
|
||||
|
||||
static pciDeviceList *
|
||||
qemuGetActivePciHostDeviceList(struct qemud_driver *driver,
|
||||
qemuGetActivePciHostDeviceList(virQEMUDriverPtr driver,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs)
|
||||
{
|
||||
@ -116,7 +116,7 @@ qemuGetActivePciHostDeviceList(struct qemud_driver *driver,
|
||||
return list;
|
||||
}
|
||||
|
||||
int qemuUpdateActivePciHostdevs(struct qemud_driver *driver,
|
||||
int qemuUpdateActivePciHostdevs(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
virDomainHostdevDefPtr hostdev = NULL;
|
||||
@ -160,7 +160,7 @@ int qemuUpdateActivePciHostdevs(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
int
|
||||
qemuUpdateActiveUsbHostdevs(struct qemud_driver *driver,
|
||||
qemuUpdateActiveUsbHostdevs(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
virDomainHostdevDefPtr hostdev = NULL;
|
||||
@ -399,7 +399,7 @@ qemuDomainHostdevNetConfigRestore(virDomainHostdevDefPtr hostdev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qemuPrepareHostdevPCIDevices(struct qemud_driver *driver,
|
||||
int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
const unsigned char *uuid,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
@ -586,7 +586,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuPrepareHostPCIDevices(struct qemud_driver *driver,
|
||||
qemuPrepareHostPCIDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
return qemuPrepareHostdevPCIDevices(driver, def->name, def->uuid,
|
||||
@ -594,7 +594,7 @@ qemuPrepareHostPCIDevices(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
int
|
||||
qemuPrepareHostdevUSBDevices(struct qemud_driver *driver,
|
||||
qemuPrepareHostdevUSBDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
usbDeviceList *list)
|
||||
{
|
||||
@ -728,7 +728,7 @@ out:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuPrepareHostUSBDevices(struct qemud_driver *driver,
|
||||
qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
bool coldBoot)
|
||||
{
|
||||
@ -795,7 +795,7 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qemuPrepareHostDevices(struct qemud_driver *driver,
|
||||
int qemuPrepareHostDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
bool coldBoot)
|
||||
{
|
||||
@ -812,7 +812,7 @@ int qemuPrepareHostDevices(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
void qemuReattachPciDevice(pciDevice *dev, struct qemud_driver *driver)
|
||||
void qemuReattachPciDevice(pciDevice *dev, virQEMUDriverPtr driver)
|
||||
{
|
||||
int retries = 100;
|
||||
|
||||
@ -840,7 +840,7 @@ void qemuReattachPciDevice(pciDevice *dev, struct qemud_driver *driver)
|
||||
}
|
||||
|
||||
|
||||
void qemuDomainReAttachHostdevDevices(struct qemud_driver *driver,
|
||||
void qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs)
|
||||
@ -916,7 +916,7 @@ void qemuDomainReAttachHostdevDevices(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
static void
|
||||
qemuDomainReAttachHostUsbDevices(struct qemud_driver *driver,
|
||||
qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs)
|
||||
@ -975,7 +975,7 @@ qemuDomainReAttachHostUsbDevices(struct qemud_driver *driver,
|
||||
}
|
||||
}
|
||||
|
||||
void qemuDomainReAttachHostDevices(struct qemud_driver *driver,
|
||||
void qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
if (!def->nhostdevs)
|
||||
|
@ -27,11 +27,11 @@
|
||||
# include "qemu_conf.h"
|
||||
# include "domain_conf.h"
|
||||
|
||||
int qemuUpdateActivePciHostdevs(struct qemud_driver *driver,
|
||||
int qemuUpdateActivePciHostdevs(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
int qemuUpdateActiveUsbHostdevs(struct qemud_driver *driver,
|
||||
int qemuUpdateActiveUsbHostdevs(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
int qemuPrepareHostdevPCIDevices(struct qemud_driver *driver,
|
||||
int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
const unsigned char *uuid,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
@ -39,18 +39,18 @@ int qemuPrepareHostdevPCIDevices(struct qemud_driver *driver,
|
||||
int qemuFindHostdevUSBDevice(virDomainHostdevDefPtr hostdev,
|
||||
bool mandatory,
|
||||
usbDevice **usb);
|
||||
int qemuPrepareHostdevUSBDevices(struct qemud_driver *driver,
|
||||
int qemuPrepareHostdevUSBDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
usbDeviceList *list);
|
||||
int qemuPrepareHostDevices(struct qemud_driver *driver,
|
||||
int qemuPrepareHostDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def,
|
||||
bool coldBoot);
|
||||
void qemuReattachPciDevice(pciDevice *dev, struct qemud_driver *driver);
|
||||
void qemuDomainReAttachHostdevDevices(struct qemud_driver *driver,
|
||||
void qemuReattachPciDevice(pciDevice *dev, virQEMUDriverPtr driver);
|
||||
void qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs);
|
||||
void qemuDomainReAttachHostDevices(struct qemud_driver *driver,
|
||||
void qemuDomainReAttachHostDevices(virQEMUDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
int qemuDomainHostdevIsVirtualFunction(virDomainHostdevDefPtr hostdev);
|
||||
int qemuDomainHostdevNetConfigReplace(virDomainHostdevDefPtr hostdev,
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||
|
||||
int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
|
||||
int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk,
|
||||
bool force)
|
||||
@ -158,7 +158,7 @@ error:
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainCheckEjectableMedia(struct qemud_driver *driver,
|
||||
qemuDomainCheckEjectableMedia(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
@ -201,7 +201,7 @@ cleanup:
|
||||
|
||||
|
||||
int qemuDomainAttachPciDiskDevice(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk)
|
||||
{
|
||||
@ -315,7 +315,7 @@ error:
|
||||
}
|
||||
|
||||
|
||||
int qemuDomainAttachPciControllerDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachPciControllerDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainControllerDefPtr controller)
|
||||
{
|
||||
@ -387,7 +387,7 @@ cleanup:
|
||||
|
||||
|
||||
static virDomainControllerDefPtr
|
||||
qemuDomainFindOrCreateSCSIDiskController(struct qemud_driver *driver,
|
||||
qemuDomainFindOrCreateSCSIDiskController(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int controller)
|
||||
{
|
||||
@ -434,7 +434,7 @@ qemuDomainFindOrCreateSCSIDiskController(struct qemud_driver *driver,
|
||||
|
||||
|
||||
int qemuDomainAttachSCSIDisk(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk)
|
||||
{
|
||||
@ -560,7 +560,7 @@ error:
|
||||
|
||||
|
||||
int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk)
|
||||
{
|
||||
@ -655,7 +655,7 @@ error:
|
||||
|
||||
/* XXX conn required for network -> bridge resolution */
|
||||
int qemuDomainAttachNetDevice(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainNetDefPtr net)
|
||||
{
|
||||
@ -935,7 +935,7 @@ no_memory:
|
||||
}
|
||||
|
||||
|
||||
int qemuDomainAttachHostPciDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachHostPciDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev)
|
||||
{
|
||||
@ -1028,7 +1028,7 @@ error:
|
||||
}
|
||||
|
||||
|
||||
int qemuDomainAttachRedirdevDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainRedirdevDefPtr redirdev)
|
||||
{
|
||||
@ -1072,7 +1072,7 @@ error:
|
||||
|
||||
}
|
||||
|
||||
int qemuDomainAttachHostUsbDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachHostUsbDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev)
|
||||
{
|
||||
@ -1137,7 +1137,7 @@ error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int qemuDomainAttachHostDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev)
|
||||
{
|
||||
@ -1330,7 +1330,7 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qemuDomainChangeNetLinkState(struct qemud_driver *driver,
|
||||
int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainNetDefPtr dev,
|
||||
int linkstate)
|
||||
@ -1362,7 +1362,7 @@ cleanup:
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainChangeNet(struct qemud_driver *driver,
|
||||
qemuDomainChangeNet(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainPtr dom,
|
||||
virDomainDeviceDefPtr dev)
|
||||
@ -1732,7 +1732,7 @@ static virDomainGraphicsDefPtr qemuDomainFindGraphics(virDomainObjPtr vm,
|
||||
|
||||
|
||||
int
|
||||
qemuDomainChangeGraphics(struct qemud_driver *driver,
|
||||
qemuDomainChangeGraphics(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainGraphicsDefPtr dev)
|
||||
{
|
||||
@ -1918,7 +1918,7 @@ static bool qemuIsMultiFunctionDevice(virDomainDefPtr def,
|
||||
}
|
||||
|
||||
|
||||
int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachPciDiskDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev)
|
||||
{
|
||||
@ -2024,7 +2024,7 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachDiskDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev)
|
||||
{
|
||||
@ -2164,7 +2164,7 @@ static bool qemuDomainControllerIsBusy(virDomainObjPtr vm,
|
||||
}
|
||||
}
|
||||
|
||||
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachPciControllerDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev)
|
||||
{
|
||||
@ -2239,7 +2239,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuDomainDetachHostPciDevice(struct qemud_driver *driver,
|
||||
qemuDomainDetachHostPciDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr detach)
|
||||
{
|
||||
@ -2309,7 +2309,7 @@ qemuDomainDetachHostPciDevice(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
static int
|
||||
qemuDomainDetachHostUsbDevice(struct qemud_driver *driver,
|
||||
qemuDomainDetachHostUsbDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr detach)
|
||||
{
|
||||
@ -2349,7 +2349,7 @@ qemuDomainDetachHostUsbDevice(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
static
|
||||
int qemuDomainDetachThisHostDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachThisHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr detach,
|
||||
int idx)
|
||||
@ -2398,7 +2398,7 @@ int qemuDomainDetachThisHostDevice(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
/* search for a hostdev matching dev and detach it */
|
||||
int qemuDomainDetachHostDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev)
|
||||
{
|
||||
@ -2453,7 +2453,7 @@ int qemuDomainDetachHostDevice(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainDetachNetDevice(struct qemud_driver *driver,
|
||||
qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev)
|
||||
{
|
||||
@ -2590,7 +2590,7 @@ cleanup:
|
||||
}
|
||||
|
||||
int
|
||||
qemuDomainChangeGraphicsPasswords(struct qemud_driver *driver,
|
||||
qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int type,
|
||||
virDomainGraphicsAuthDefPtr auth,
|
||||
@ -2656,7 +2656,7 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int qemuDomainAttachLease(struct qemud_driver *driver,
|
||||
int qemuDomainAttachLease(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainLeaseDefPtr lease)
|
||||
{
|
||||
@ -2673,7 +2673,7 @@ int qemuDomainAttachLease(struct qemud_driver *driver,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int qemuDomainDetachLease(struct qemud_driver *driver,
|
||||
int qemuDomainDetachLease(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainLeaseDefPtr lease)
|
||||
{
|
||||
|
@ -28,79 +28,79 @@
|
||||
# include "qemu_domain.h"
|
||||
# include "domain_conf.h"
|
||||
|
||||
int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
|
||||
int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk,
|
||||
bool force);
|
||||
int qemuDomainCheckEjectableMedia(struct qemud_driver *driver,
|
||||
int qemuDomainCheckEjectableMedia(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuDomainAsyncJob asyncJob);
|
||||
int qemuDomainAttachPciDiskDevice(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk);
|
||||
int qemuDomainAttachPciControllerDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachPciControllerDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainControllerDefPtr controller);
|
||||
int qemuDomainAttachSCSIDisk(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk);
|
||||
int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk);
|
||||
int qemuDomainAttachNetDevice(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainNetDefPtr net);
|
||||
int qemuDomainAttachHostPciDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachHostPciDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev);
|
||||
int qemuDomainAttachHostUsbDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachHostUsbDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev);
|
||||
int qemuDomainAttachRedirdevDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainRedirdevDefPtr hostdev);
|
||||
int qemuDomainAttachHostDevice(struct qemud_driver *driver,
|
||||
int qemuDomainAttachHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev);
|
||||
int qemuDomainChangeGraphics(struct qemud_driver *driver,
|
||||
int qemuDomainChangeGraphics(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainGraphicsDefPtr dev);
|
||||
int qemuDomainChangeGraphicsPasswords(struct qemud_driver *driver,
|
||||
int qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int type,
|
||||
virDomainGraphicsAuthDefPtr auth,
|
||||
const char *defaultPasswd);
|
||||
int qemuDomainChangeNet(struct qemud_driver *driver,
|
||||
int qemuDomainChangeNet(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainPtr dom,
|
||||
virDomainDeviceDefPtr dev);
|
||||
int qemuDomainChangeNetLinkState(struct qemud_driver *driver,
|
||||
int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainNetDefPtr dev,
|
||||
int linkstate);
|
||||
int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachPciDiskDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev);
|
||||
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachDiskDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev);
|
||||
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachPciControllerDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev);
|
||||
int qemuDomainDetachNetDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev);
|
||||
int qemuDomainDetachHostDevice(struct qemud_driver *driver,
|
||||
int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDeviceDefPtr dev);
|
||||
int qemuDomainAttachLease(struct qemud_driver *driver,
|
||||
int qemuDomainAttachLease(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainLeaseDefPtr lease);
|
||||
int qemuDomainDetachLease(struct qemud_driver *driver,
|
||||
int qemuDomainDetachLease(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainLeaseDefPtr lease);
|
||||
|
||||
|
@ -257,7 +257,7 @@ error:
|
||||
|
||||
|
||||
static qemuMigrationCookieGraphicsPtr
|
||||
qemuMigrationCookieGraphicsAlloc(struct qemud_driver *driver,
|
||||
qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
|
||||
virDomainGraphicsDefPtr def)
|
||||
{
|
||||
qemuMigrationCookieGraphicsPtr mig = NULL;
|
||||
@ -304,7 +304,7 @@ error:
|
||||
|
||||
|
||||
static qemuMigrationCookieNetworkPtr
|
||||
qemuMigrationCookieNetworkAlloc(struct qemud_driver *driver ATTRIBUTE_UNUSED,
|
||||
qemuMigrationCookieNetworkAlloc(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
qemuMigrationCookieNetworkPtr mig;
|
||||
@ -394,7 +394,7 @@ error:
|
||||
|
||||
static int
|
||||
qemuMigrationCookieAddGraphics(qemuMigrationCookiePtr mig,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr dom)
|
||||
{
|
||||
if (mig->flags & QEMU_MIGRATION_COOKIE_GRAPHICS) {
|
||||
@ -418,7 +418,7 @@ qemuMigrationCookieAddGraphics(qemuMigrationCookiePtr mig,
|
||||
|
||||
static int
|
||||
qemuMigrationCookieAddLockstate(qemuMigrationCookiePtr mig,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr dom)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = dom->privateData;
|
||||
@ -472,7 +472,7 @@ qemuMigrationCookieAddPersistent(qemuMigrationCookiePtr mig,
|
||||
|
||||
static int
|
||||
qemuMigrationCookieAddNetwork(qemuMigrationCookiePtr mig,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr dom)
|
||||
{
|
||||
if (mig->flags & QEMU_MIGRATION_COOKIE_NETWORK) {
|
||||
@ -542,7 +542,7 @@ qemuMigrationCookieNetworkXMLFormat(virBufferPtr buf,
|
||||
|
||||
|
||||
static int
|
||||
qemuMigrationCookieXMLFormat(struct qemud_driver *driver,
|
||||
qemuMigrationCookieXMLFormat(virQEMUDriverPtr driver,
|
||||
virBufferPtr buf,
|
||||
qemuMigrationCookiePtr mig)
|
||||
{
|
||||
@ -599,7 +599,7 @@ qemuMigrationCookieXMLFormat(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
static char *qemuMigrationCookieXMLFormatStr(struct qemud_driver *driver,
|
||||
static char *qemuMigrationCookieXMLFormatStr(virQEMUDriverPtr driver,
|
||||
qemuMigrationCookiePtr mig)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
@ -724,7 +724,7 @@ error:
|
||||
|
||||
static int
|
||||
qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
xmlDocPtr doc,
|
||||
xmlXPathContextPtr ctxt,
|
||||
unsigned int flags)
|
||||
@ -884,7 +884,7 @@ error:
|
||||
|
||||
static int
|
||||
qemuMigrationCookieXMLParseStr(qemuMigrationCookiePtr mig,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
const char *xml,
|
||||
unsigned int flags)
|
||||
{
|
||||
@ -909,7 +909,7 @@ cleanup:
|
||||
|
||||
static int
|
||||
qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr dom,
|
||||
char **cookieout,
|
||||
int *cookieoutlen,
|
||||
@ -949,7 +949,7 @@ qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
|
||||
|
||||
|
||||
static qemuMigrationCookiePtr
|
||||
qemuMigrationEatCookie(struct qemud_driver *driver,
|
||||
qemuMigrationEatCookie(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr dom,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
@ -1012,7 +1012,7 @@ error:
|
||||
* talking to the destination in the first place, we are stuck with
|
||||
* the fact that older servers did not do checks on the source. */
|
||||
static bool
|
||||
qemuMigrationIsAllowed(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
int nsnapshots;
|
||||
@ -1103,7 +1103,7 @@ qemuMigrationIsSafe(virDomainDefPtr def)
|
||||
* Pause domain for non-live migration.
|
||||
*/
|
||||
int
|
||||
qemuMigrationSetOffline(struct qemud_driver *driver,
|
||||
qemuMigrationSetOffline(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
int ret;
|
||||
@ -1125,7 +1125,7 @@ qemuMigrationSetOffline(struct qemud_driver *driver,
|
||||
|
||||
|
||||
static int
|
||||
qemuMigrationUpdateJobStatus(struct qemud_driver *driver,
|
||||
qemuMigrationUpdateJobStatus(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
const char *job,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
@ -1215,7 +1215,7 @@ qemuMigrationUpdateJobStatus(struct qemud_driver *driver,
|
||||
|
||||
|
||||
static int
|
||||
qemuMigrationWaitForCompletion(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
qemuMigrationWaitForCompletion(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
enum qemuDomainAsyncJob asyncJob,
|
||||
virConnectPtr dconn)
|
||||
{
|
||||
@ -1269,7 +1269,7 @@ cleanup:
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainMigrateGraphicsRelocate(struct qemud_driver *driver,
|
||||
qemuDomainMigrateGraphicsRelocate(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
qemuMigrationCookiePtr cookie)
|
||||
{
|
||||
@ -1305,7 +1305,7 @@ qemuDomainMigrateGraphicsRelocate(struct qemud_driver *driver,
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainMigrateOPDRelocate(struct qemud_driver *driver ATTRIBUTE_UNUSED,
|
||||
qemuDomainMigrateOPDRelocate(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm,
|
||||
qemuMigrationCookiePtr cookie)
|
||||
{
|
||||
@ -1348,7 +1348,7 @@ cleanup:
|
||||
* qemuDomainMigratePerform3 and qemuDomainMigrateConfirm3.
|
||||
*/
|
||||
virDomainObjPtr
|
||||
qemuMigrationCleanup(struct qemud_driver *driver,
|
||||
qemuMigrationCleanup(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn)
|
||||
{
|
||||
@ -1403,7 +1403,7 @@ cleanup:
|
||||
}
|
||||
|
||||
/* The caller is supposed to lock the vm and start a migration job. */
|
||||
char *qemuMigrationBegin(struct qemud_driver *driver,
|
||||
char *qemuMigrationBegin(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
const char *xmlin,
|
||||
const char *dname,
|
||||
@ -1473,7 +1473,7 @@ cleanup:
|
||||
*/
|
||||
|
||||
static void
|
||||
qemuMigrationPrepareCleanup(struct qemud_driver *driver,
|
||||
qemuMigrationPrepareCleanup(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
@ -1490,7 +1490,7 @@ qemuMigrationPrepareCleanup(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
static int
|
||||
qemuMigrationPrepareAny(struct qemud_driver *driver,
|
||||
qemuMigrationPrepareAny(virQEMUDriverPtr driver,
|
||||
virConnectPtr dconn,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
@ -1700,7 +1700,7 @@ endjob:
|
||||
* sets up the corresponding virStream to handle the incoming data.
|
||||
*/
|
||||
int
|
||||
qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
||||
qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
|
||||
virConnectPtr dconn,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
@ -1728,7 +1728,7 @@ qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
||||
|
||||
|
||||
int
|
||||
qemuMigrationPrepareDirect(struct qemud_driver *driver,
|
||||
qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
|
||||
virConnectPtr dconn,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
@ -2075,7 +2075,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuMigrationConnect(struct qemud_driver *driver,
|
||||
qemuMigrationConnect(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
qemuMigrationSpecPtr spec)
|
||||
{
|
||||
@ -2113,7 +2113,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuMigrationRun(struct qemud_driver *driver,
|
||||
qemuMigrationRun(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
@ -2327,7 +2327,7 @@ cancel:
|
||||
/* Perform migration using QEMU's native TCP migrate support,
|
||||
* not encrypted obviously
|
||||
*/
|
||||
static int doNativeMigrate(struct qemud_driver *driver,
|
||||
static int doNativeMigrate(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
const char *uri,
|
||||
const char *cookiein,
|
||||
@ -2383,7 +2383,7 @@ static int doNativeMigrate(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
static int doTunnelMigrate(struct qemud_driver *driver,
|
||||
static int doTunnelMigrate(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virStreamPtr st,
|
||||
const char *cookiein,
|
||||
@ -2474,7 +2474,7 @@ cleanup:
|
||||
* from libvirt.c, but running in source libvirtd context,
|
||||
* instead of client app context & also adding in tunnel
|
||||
* handling */
|
||||
static int doPeer2PeerMigrate2(struct qemud_driver *driver,
|
||||
static int doPeer2PeerMigrate2(virQEMUDriverPtr driver,
|
||||
virConnectPtr sconn ATTRIBUTE_UNUSED,
|
||||
virConnectPtr dconn,
|
||||
virDomainObjPtr vm,
|
||||
@ -2612,7 +2612,7 @@ cleanup:
|
||||
* from libvirt.c, but running in source libvirtd context,
|
||||
* instead of client app context & also adding in tunnel
|
||||
* handling */
|
||||
static int doPeer2PeerMigrate3(struct qemud_driver *driver,
|
||||
static int doPeer2PeerMigrate3(virQEMUDriverPtr driver,
|
||||
virConnectPtr sconn,
|
||||
virConnectPtr dconn,
|
||||
virDomainObjPtr vm,
|
||||
@ -2802,7 +2802,7 @@ finish:
|
||||
}
|
||||
|
||||
|
||||
static int doPeer2PeerMigrate(struct qemud_driver *driver,
|
||||
static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
||||
virConnectPtr sconn,
|
||||
virDomainObjPtr vm,
|
||||
const char *xmlin,
|
||||
@ -2898,7 +2898,7 @@ cleanup:
|
||||
* perform phase of v2 non-peer2peer migration.
|
||||
*/
|
||||
static int
|
||||
qemuMigrationPerformJob(struct qemud_driver *driver,
|
||||
qemuMigrationPerformJob(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
const char *xmlin,
|
||||
@ -3012,7 +3012,7 @@ cleanup:
|
||||
* This implements perform phase of v3 migration protocol.
|
||||
*/
|
||||
static int
|
||||
qemuMigrationPerformPhase(struct qemud_driver *driver,
|
||||
qemuMigrationPerformPhase(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
const char *uri,
|
||||
@ -3093,7 +3093,7 @@ cleanup:
|
||||
}
|
||||
|
||||
int
|
||||
qemuMigrationPerform(struct qemud_driver *driver,
|
||||
qemuMigrationPerform(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
const char *xmlin,
|
||||
@ -3200,7 +3200,7 @@ err_exit:
|
||||
|
||||
|
||||
virDomainPtr
|
||||
qemuMigrationFinish(struct qemud_driver *driver,
|
||||
qemuMigrationFinish(virQEMUDriverPtr driver,
|
||||
virConnectPtr dconn,
|
||||
virDomainObjPtr vm,
|
||||
const char *cookiein,
|
||||
@ -3404,7 +3404,7 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
int qemuMigrationConfirm(struct qemud_driver *driver,
|
||||
int qemuMigrationConfirm(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
const char *cookiein,
|
||||
@ -3477,7 +3477,7 @@ cleanup:
|
||||
|
||||
/* Helper function called while driver lock is held and vm is active. */
|
||||
int
|
||||
qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
int fd, off_t offset, const char *path,
|
||||
const char *compressor,
|
||||
bool bypassSecurityDriver,
|
||||
@ -3639,7 +3639,7 @@ cleanup:
|
||||
}
|
||||
|
||||
int
|
||||
qemuMigrationJobStart(struct qemud_driver *driver,
|
||||
qemuMigrationJobStart(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuDomainAsyncJob job)
|
||||
{
|
||||
@ -3662,7 +3662,7 @@ qemuMigrationJobStart(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
void
|
||||
qemuMigrationJobSetPhase(struct qemud_driver *driver,
|
||||
qemuMigrationJobSetPhase(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuMigrationJobPhase phase)
|
||||
{
|
||||
@ -3679,7 +3679,7 @@ qemuMigrationJobSetPhase(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
void
|
||||
qemuMigrationJobStartPhase(struct qemud_driver *driver,
|
||||
qemuMigrationJobStartPhase(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuMigrationJobPhase phase)
|
||||
{
|
||||
@ -3715,7 +3715,7 @@ qemuMigrationJobIsActive(virDomainObjPtr vm,
|
||||
}
|
||||
|
||||
bool
|
||||
qemuMigrationJobFinish(struct qemud_driver *driver, virDomainObjPtr vm)
|
||||
qemuMigrationJobFinish(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||
{
|
||||
return qemuDomainObjEndAsyncJob(driver, vm);
|
||||
}
|
||||
|
@ -54,15 +54,15 @@ enum qemuMigrationJobPhase {
|
||||
};
|
||||
VIR_ENUM_DECL(qemuMigrationJobPhase)
|
||||
|
||||
int qemuMigrationJobStart(struct qemud_driver *driver,
|
||||
int qemuMigrationJobStart(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuDomainAsyncJob job)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
void qemuMigrationJobSetPhase(struct qemud_driver *driver,
|
||||
void qemuMigrationJobSetPhase(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuMigrationJobPhase phase)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void qemuMigrationJobStartPhase(struct qemud_driver *driver,
|
||||
void qemuMigrationJobStartPhase(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
enum qemuMigrationJobPhase phase)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
@ -71,17 +71,17 @@ bool qemuMigrationJobContinue(virDomainObjPtr obj)
|
||||
bool qemuMigrationJobIsActive(virDomainObjPtr vm,
|
||||
enum qemuDomainAsyncJob job)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
bool qemuMigrationJobFinish(struct qemud_driver *driver, virDomainObjPtr obj)
|
||||
bool qemuMigrationJobFinish(virQEMUDriverPtr driver, virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
int qemuMigrationSetOffline(struct qemud_driver *driver,
|
||||
int qemuMigrationSetOffline(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm);
|
||||
|
||||
virDomainObjPtr qemuMigrationCleanup(struct qemud_driver *driver,
|
||||
virDomainObjPtr qemuMigrationCleanup(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn);
|
||||
|
||||
char *qemuMigrationBegin(struct qemud_driver *driver,
|
||||
char *qemuMigrationBegin(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
const char *xmlin,
|
||||
const char *dname,
|
||||
@ -89,7 +89,7 @@ char *qemuMigrationBegin(struct qemud_driver *driver,
|
||||
int *cookieoutlen,
|
||||
unsigned long flags);
|
||||
|
||||
int qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
||||
int qemuMigrationPrepareTunnel(virQEMUDriverPtr driver,
|
||||
virConnectPtr dconn,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
@ -99,7 +99,7 @@ int qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
||||
const char *dname,
|
||||
const char *dom_xml);
|
||||
|
||||
int qemuMigrationPrepareDirect(struct qemud_driver *driver,
|
||||
int qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
|
||||
virConnectPtr dconn,
|
||||
const char *cookiein,
|
||||
int cookieinlen,
|
||||
@ -110,7 +110,7 @@ int qemuMigrationPrepareDirect(struct qemud_driver *driver,
|
||||
const char *dname,
|
||||
const char *dom_xml);
|
||||
|
||||
int qemuMigrationPerform(struct qemud_driver *driver,
|
||||
int qemuMigrationPerform(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
const char *xmlin,
|
||||
@ -125,7 +125,7 @@ int qemuMigrationPerform(struct qemud_driver *driver,
|
||||
unsigned long resource,
|
||||
bool v3proto);
|
||||
|
||||
virDomainPtr qemuMigrationFinish(struct qemud_driver *driver,
|
||||
virDomainPtr qemuMigrationFinish(virQEMUDriverPtr driver,
|
||||
virConnectPtr dconn,
|
||||
virDomainObjPtr vm,
|
||||
const char *cookiein,
|
||||
@ -136,7 +136,7 @@ virDomainPtr qemuMigrationFinish(struct qemud_driver *driver,
|
||||
int retcode,
|
||||
bool v3proto);
|
||||
|
||||
int qemuMigrationConfirm(struct qemud_driver *driver,
|
||||
int qemuMigrationConfirm(virQEMUDriverPtr driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
const char *cookiein,
|
||||
@ -145,7 +145,7 @@ int qemuMigrationConfirm(struct qemud_driver *driver,
|
||||
int retcode);
|
||||
|
||||
|
||||
int qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
int qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
int fd, off_t offset, const char *path,
|
||||
const char *compressor,
|
||||
bool bypassSecurityDriver,
|
||||
|
@ -80,7 +80,7 @@
|
||||
* Returns 0 on success
|
||||
*/
|
||||
static int
|
||||
qemuProcessRemoveDomainStatus(struct qemud_driver *driver,
|
||||
qemuProcessRemoveDomainStatus(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
char ebuf[1024];
|
||||
@ -108,7 +108,7 @@ qemuProcessRemoveDomainStatus(struct qemud_driver *driver,
|
||||
|
||||
|
||||
/* XXX figure out how to remove this */
|
||||
extern struct qemud_driver *qemu_driver;
|
||||
extern virQEMUDriverPtr qemu_driver;
|
||||
|
||||
/*
|
||||
* This is a callback registered with a qemuAgentPtr instance,
|
||||
@ -120,7 +120,7 @@ static void
|
||||
qemuProcessHandleAgentEOF(qemuAgentPtr agent,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
|
||||
VIR_DEBUG("Received EOF from agent on %p '%s'", vm, vm->def->name);
|
||||
@ -149,7 +149,7 @@ static void
|
||||
qemuProcessHandleAgentError(qemuAgentPtr agent ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
|
||||
VIR_DEBUG("Received error from agent on %p '%s'", vm, vm->def->name);
|
||||
@ -202,7 +202,7 @@ qemuFindAgentConfig(virDomainDefPtr def)
|
||||
}
|
||||
|
||||
static int
|
||||
qemuConnectAgent(struct qemud_driver *driver, virDomainObjPtr vm)
|
||||
qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
int ret = -1;
|
||||
@ -273,7 +273,7 @@ static void
|
||||
qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
int eventReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
|
||||
@ -336,7 +336,7 @@ static void
|
||||
qemuProcessHandleMonitorError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
|
||||
VIR_DEBUG("Received error on %p '%s'", vm, vm->def->name);
|
||||
@ -505,7 +505,7 @@ static int
|
||||
qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
|
||||
@ -539,7 +539,7 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
static void
|
||||
qemuProcessFakeReboot(void *opaque)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainObjPtr vm = opaque;
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
virDomainEventPtr event = NULL;
|
||||
@ -604,7 +604,7 @@ cleanup:
|
||||
|
||||
|
||||
static void
|
||||
qemuProcessShutdownOrReboot(struct qemud_driver *driver,
|
||||
qemuProcessShutdownOrReboot(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
@ -631,7 +631,7 @@ static int
|
||||
qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
virDomainEventPtr event = NULL;
|
||||
|
||||
@ -687,7 +687,7 @@ static int
|
||||
qemuProcessHandleStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
|
||||
virDomainObjLock(vm);
|
||||
@ -736,7 +736,7 @@ qemuProcessHandleRTCChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm,
|
||||
long long offset)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event;
|
||||
|
||||
virDomainObjLock(vm);
|
||||
@ -765,7 +765,7 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm,
|
||||
int action)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr watchdogEvent = NULL;
|
||||
virDomainEventPtr lifecycleEvent = NULL;
|
||||
|
||||
@ -835,7 +835,7 @@ qemuProcessHandleIOError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
int action,
|
||||
const char *reason)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr ioErrorEvent = NULL;
|
||||
virDomainEventPtr ioErrorEvent2 = NULL;
|
||||
virDomainEventPtr lifecycleEvent = NULL;
|
||||
@ -898,7 +898,7 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
int type,
|
||||
int status)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
const char *path;
|
||||
virDomainDiskDefPtr disk;
|
||||
@ -950,7 +950,7 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
const char *x509dname,
|
||||
const char *saslUsername)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event;
|
||||
virDomainEventGraphicsAddressPtr localAddr = NULL;
|
||||
virDomainEventGraphicsAddressPtr remoteAddr = NULL;
|
||||
@ -1039,7 +1039,7 @@ qemuProcessHandleTrayChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
const char *devAlias,
|
||||
int reason)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
virDomainDiskDefPtr disk;
|
||||
|
||||
@ -1077,7 +1077,7 @@ static int
|
||||
qemuProcessHandlePMWakeup(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
virDomainEventPtr lifecycleEvent = NULL;
|
||||
|
||||
@ -1121,7 +1121,7 @@ static int
|
||||
qemuProcessHandlePMSuspend(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
virDomainEventPtr lifecycleEvent = NULL;
|
||||
|
||||
@ -1168,7 +1168,7 @@ qemuProcessHandleBalloonChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm,
|
||||
unsigned long long actual)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event;
|
||||
|
||||
virDomainObjLock(vm);
|
||||
@ -1196,7 +1196,7 @@ static int
|
||||
qemuProcessHandlePMSuspendDisk(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
struct qemud_driver *driver = qemu_driver;
|
||||
virQEMUDriverPtr driver = qemu_driver;
|
||||
virDomainEventPtr event = NULL;
|
||||
virDomainEventPtr lifecycleEvent = NULL;
|
||||
|
||||
@ -1260,7 +1260,7 @@ static qemuMonitorCallbacks monitorCallbacks = {
|
||||
};
|
||||
|
||||
static int
|
||||
qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
|
||||
qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
int ret = -1;
|
||||
@ -1634,7 +1634,7 @@ qemuProcessReadLogFD(int logfd, char *buf, int maxlen, int off)
|
||||
|
||||
|
||||
static int
|
||||
qemuProcessWaitForMonitor(struct qemud_driver* driver,
|
||||
qemuProcessWaitForMonitor(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
qemuCapsPtr caps,
|
||||
off_t pos)
|
||||
@ -1709,7 +1709,7 @@ closelog:
|
||||
}
|
||||
|
||||
static int
|
||||
qemuProcessDetectVcpuPIDs(struct qemud_driver *driver,
|
||||
qemuProcessDetectVcpuPIDs(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
pid_t *cpupids = NULL;
|
||||
@ -1898,7 +1898,7 @@ qemuGetNumadAdvice(virDomainDefPtr def ATTRIBUTE_UNUSED)
|
||||
* just return a new allocated bitmap.
|
||||
*/
|
||||
virBitmapPtr
|
||||
qemuPrepareCpumap(struct qemud_driver *driver,
|
||||
qemuPrepareCpumap(virQEMUDriverPtr driver,
|
||||
virBitmapPtr nodemask)
|
||||
{
|
||||
int i, hostcpus, maxcpu = QEMUD_CPUMASK_LEN;
|
||||
@ -1943,7 +1943,7 @@ qemuPrepareCpumap(struct qemud_driver *driver,
|
||||
* To be run between fork/exec of QEMU only
|
||||
*/
|
||||
static int
|
||||
qemuProcessInitCpuAffinity(struct qemud_driver *driver,
|
||||
qemuProcessInitCpuAffinity(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virBitmapPtr nodemask)
|
||||
{
|
||||
@ -2073,7 +2073,7 @@ qemuProcessSetEmulatorAffinites(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
static int
|
||||
qemuProcessInitPasswords(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -2497,7 +2497,7 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm,
|
||||
}
|
||||
|
||||
static int
|
||||
qemuProcessInitPCIAddresses(struct qemud_driver *driver,
|
||||
qemuProcessInitPCIAddresses(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
@ -2518,7 +2518,7 @@ qemuProcessInitPCIAddresses(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
static int qemuProcessNextFreePort(struct qemud_driver *driver,
|
||||
static int qemuProcessNextFreePort(virQEMUDriverPtr driver,
|
||||
int startPort)
|
||||
{
|
||||
int i;
|
||||
@ -2573,7 +2573,7 @@ static int qemuProcessNextFreePort(struct qemud_driver *driver,
|
||||
|
||||
|
||||
static void
|
||||
qemuProcessReturnPort(struct qemud_driver *driver,
|
||||
qemuProcessReturnPort(virQEMUDriverPtr driver,
|
||||
int port)
|
||||
{
|
||||
if (port < driver->remotePortMin)
|
||||
@ -2609,7 +2609,7 @@ qemuProcessPrepareChardevDevice(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static int
|
||||
qemuProcessLimits(struct qemud_driver *driver)
|
||||
qemuProcessLimits(virQEMUDriverPtr driver)
|
||||
{
|
||||
struct rlimit rlim;
|
||||
|
||||
@ -2642,7 +2642,7 @@ qemuProcessLimits(struct qemud_driver *driver)
|
||||
struct qemuProcessHookData {
|
||||
virConnectPtr conn;
|
||||
virDomainObjPtr vm;
|
||||
struct qemud_driver *driver;
|
||||
virQEMUDriverPtr driver;
|
||||
virBitmapPtr nodemask;
|
||||
};
|
||||
|
||||
@ -2706,7 +2706,7 @@ cleanup:
|
||||
}
|
||||
|
||||
int
|
||||
qemuProcessPrepareMonitorChr(struct qemud_driver *driver,
|
||||
qemuProcessPrepareMonitorChr(virQEMUDriverPtr driver,
|
||||
virDomainChrSourceDefPtr monConfig,
|
||||
const char *vm)
|
||||
{
|
||||
@ -2729,7 +2729,7 @@ qemuProcessPrepareMonitorChr(struct qemud_driver *driver,
|
||||
* {Enter,Exit}MonitorWithDriver
|
||||
*/
|
||||
int
|
||||
qemuProcessStartCPUs(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
qemuProcessStartCPUs(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
virConnectPtr conn, virDomainRunningReason reason,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
@ -2765,7 +2765,7 @@ qemuProcessStartCPUs(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
}
|
||||
|
||||
|
||||
int qemuProcessStopCPUs(struct qemud_driver *driver, virDomainObjPtr vm,
|
||||
int qemuProcessStopCPUs(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
virDomainPausedReason reason,
|
||||
enum qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
@ -2829,7 +2829,7 @@ qemuProcessFiltersInstantiate(virConnectPtr conn,
|
||||
}
|
||||
|
||||
static int
|
||||
qemuProcessUpdateState(struct qemud_driver *driver, virDomainObjPtr vm)
|
||||
qemuProcessUpdateState(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
virDomainState state;
|
||||
@ -2890,7 +2890,7 @@ qemuProcessUpdateState(struct qemud_driver *driver, virDomainObjPtr vm)
|
||||
}
|
||||
|
||||
static int
|
||||
qemuProcessRecoverMigration(struct qemud_driver *driver,
|
||||
qemuProcessRecoverMigration(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn,
|
||||
enum qemuDomainAsyncJob job,
|
||||
@ -3002,7 +3002,7 @@ qemuProcessRecoverMigration(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
static int
|
||||
qemuProcessRecoverJob(struct qemud_driver *driver,
|
||||
qemuProcessRecoverJob(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn,
|
||||
const struct qemuDomainJobObj *job)
|
||||
@ -3095,7 +3095,7 @@ qemuProcessRecoverJob(struct qemud_driver *driver,
|
||||
|
||||
struct qemuProcessReconnectData {
|
||||
virConnectPtr conn;
|
||||
struct qemud_driver *driver;
|
||||
virQEMUDriverPtr driver;
|
||||
void *payload;
|
||||
struct qemuDomainJobObj oldjob;
|
||||
};
|
||||
@ -3111,7 +3111,7 @@ static void
|
||||
qemuProcessReconnect(void *opaque)
|
||||
{
|
||||
struct qemuProcessReconnectData *data = opaque;
|
||||
struct qemud_driver *driver = data->driver;
|
||||
virQEMUDriverPtr driver = data->driver;
|
||||
virDomainObjPtr obj = data->payload;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
virConnectPtr conn = data->conn;
|
||||
@ -3370,14 +3370,14 @@ error:
|
||||
* about.
|
||||
*/
|
||||
void
|
||||
qemuProcessReconnectAll(virConnectPtr conn, struct qemud_driver *driver)
|
||||
qemuProcessReconnectAll(virConnectPtr conn, virQEMUDriverPtr driver)
|
||||
{
|
||||
struct qemuProcessReconnectData data = {.conn = conn, .driver = driver};
|
||||
virHashForEach(driver->domains.objs, qemuProcessReconnectHelper, &data);
|
||||
}
|
||||
|
||||
int qemuProcessStart(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
const char *migrateFrom,
|
||||
int stdin_fd,
|
||||
@ -3931,7 +3931,7 @@ cleanup:
|
||||
|
||||
|
||||
int
|
||||
qemuProcessKill(struct qemud_driver *driver,
|
||||
qemuProcessKill(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm, unsigned int flags)
|
||||
{
|
||||
int ret;
|
||||
@ -3971,7 +3971,7 @@ qemuProcessKill(struct qemud_driver *driver,
|
||||
}
|
||||
|
||||
|
||||
void qemuProcessStop(struct qemud_driver *driver,
|
||||
void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainShutoffReason reason,
|
||||
unsigned int flags)
|
||||
@ -4196,7 +4196,7 @@ retry:
|
||||
|
||||
|
||||
int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
pid_t pid,
|
||||
const char *pidfile,
|
||||
@ -4410,7 +4410,7 @@ cleanup:
|
||||
|
||||
|
||||
static virDomainObjPtr
|
||||
qemuProcessAutoDestroy(struct qemud_driver *driver,
|
||||
qemuProcessAutoDestroy(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr dom,
|
||||
virConnectPtr conn)
|
||||
{
|
||||
@ -4448,7 +4448,7 @@ cleanup:
|
||||
return dom;
|
||||
}
|
||||
|
||||
int qemuProcessAutoDestroyAdd(struct qemud_driver *driver,
|
||||
int qemuProcessAutoDestroyAdd(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn)
|
||||
{
|
||||
@ -4457,14 +4457,14 @@ int qemuProcessAutoDestroyAdd(struct qemud_driver *driver,
|
||||
qemuProcessAutoDestroy);
|
||||
}
|
||||
|
||||
int qemuProcessAutoDestroyRemove(struct qemud_driver *driver,
|
||||
int qemuProcessAutoDestroyRemove(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
VIR_DEBUG("vm=%s", vm->def->name);
|
||||
return qemuDriverCloseCallbackUnset(driver, vm, qemuProcessAutoDestroy);
|
||||
}
|
||||
|
||||
bool qemuProcessAutoDestroyActive(struct qemud_driver *driver,
|
||||
bool qemuProcessAutoDestroyActive(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm)
|
||||
{
|
||||
qemuDriverCloseCallback cb;
|
||||
|
@ -25,22 +25,22 @@
|
||||
# include "qemu_conf.h"
|
||||
# include "qemu_domain.h"
|
||||
|
||||
int qemuProcessPrepareMonitorChr(struct qemud_driver *driver,
|
||||
int qemuProcessPrepareMonitorChr(virQEMUDriverPtr driver,
|
||||
virDomainChrSourceDefPtr monConfig,
|
||||
const char *vm);
|
||||
|
||||
int qemuProcessStartCPUs(struct qemud_driver *driver,
|
||||
int qemuProcessStartCPUs(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn,
|
||||
virDomainRunningReason reason,
|
||||
enum qemuDomainAsyncJob asyncJob);
|
||||
int qemuProcessStopCPUs(struct qemud_driver *driver,
|
||||
int qemuProcessStopCPUs(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainPausedReason reason,
|
||||
enum qemuDomainAsyncJob asyncJob);
|
||||
|
||||
void qemuProcessAutostartAll(struct qemud_driver *driver);
|
||||
void qemuProcessReconnectAll(virConnectPtr conn, struct qemud_driver *driver);
|
||||
void qemuProcessAutostartAll(virQEMUDriverPtr driver);
|
||||
void qemuProcessReconnectAll(virConnectPtr conn, virQEMUDriverPtr driver);
|
||||
|
||||
int qemuProcessAssignPCIAddresses(virDomainDefPtr def);
|
||||
|
||||
@ -51,7 +51,7 @@ typedef enum {
|
||||
} qemuProcessStartFlags;
|
||||
|
||||
int qemuProcessStart(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
const char *migrateFrom,
|
||||
int stdin_fd,
|
||||
@ -65,13 +65,13 @@ typedef enum {
|
||||
VIR_QEMU_PROCESS_STOP_NO_RELABEL = 1 << 1,
|
||||
} qemuProcessStopFlags;
|
||||
|
||||
void qemuProcessStop(struct qemud_driver *driver,
|
||||
void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainShutoffReason reason,
|
||||
unsigned int flags);
|
||||
|
||||
int qemuProcessAttach(virConnectPtr conn,
|
||||
struct qemud_driver *driver,
|
||||
virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
pid_t pid,
|
||||
const char *pidfile,
|
||||
@ -84,19 +84,19 @@ typedef enum {
|
||||
VIR_QEMU_PROCESS_KILL_NOCHECK = 1 << 2, /* bypass the running vm check */
|
||||
} virQemuProcessKillMode;
|
||||
|
||||
int qemuProcessKill(struct qemud_driver *driver,
|
||||
int qemuProcessKill(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm, unsigned int flags);
|
||||
|
||||
int qemuProcessAutoDestroyInit(struct qemud_driver *driver);
|
||||
void qemuProcessAutoDestroyShutdown(struct qemud_driver *driver);
|
||||
int qemuProcessAutoDestroyAdd(struct qemud_driver *driver,
|
||||
int qemuProcessAutoDestroyInit(virQEMUDriverPtr driver);
|
||||
void qemuProcessAutoDestroyShutdown(virQEMUDriverPtr driver);
|
||||
int qemuProcessAutoDestroyAdd(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virConnectPtr conn);
|
||||
int qemuProcessAutoDestroyRemove(struct qemud_driver *driver,
|
||||
int qemuProcessAutoDestroyRemove(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm);
|
||||
bool qemuProcessAutoDestroyActive(struct qemud_driver *driver,
|
||||
bool qemuProcessAutoDestroyActive(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm);
|
||||
virBitmapPtr qemuPrepareCpumap(struct qemud_driver *driver,
|
||||
virBitmapPtr qemuPrepareCpumap(virQEMUDriverPtr driver,
|
||||
virBitmapPtr nodemask);
|
||||
|
||||
#endif /* __QEMU_PROCESS_H__ */
|
||||
|
@ -16,7 +16,7 @@
|
||||
# include "qemu/qemu_domain.h"
|
||||
# include "testutilsqemu.h"
|
||||
|
||||
static struct qemud_driver driver;
|
||||
static virQEMUDriver driver;
|
||||
|
||||
static int
|
||||
testCompareXMLToXMLFiles(const char *inxml, const char *uuid, int internal)
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
# include "testutilsqemu.h"
|
||||
|
||||
static struct qemud_driver driver;
|
||||
static virQEMUDriver driver;
|
||||
|
||||
static int blankProblemElements(char *data)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
# include "testutilsqemu.h"
|
||||
|
||||
static const char *abs_top_srcdir;
|
||||
static struct qemud_driver driver;
|
||||
static virQEMUDriver driver;
|
||||
|
||||
static unsigned char *
|
||||
fakeSecretGetValue(virSecretPtr obj ATTRIBUTE_UNUSED,
|
||||
|
@ -16,7 +16,7 @@
|
||||
# include "qemu/qemu_domain.h"
|
||||
# include "testutilsqemu.h"
|
||||
|
||||
static struct qemud_driver driver;
|
||||
static virQEMUDriver driver;
|
||||
|
||||
static int
|
||||
testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool live)
|
||||
|
@ -21,7 +21,7 @@
|
||||
# include "testutilsqemu.h"
|
||||
|
||||
static const char *abs_top_srcdir;
|
||||
static struct qemud_driver driver;
|
||||
static virQEMUDriver driver;
|
||||
|
||||
static int testCompareXMLToArgvFiles(const char *xml,
|
||||
const char *cmdline,
|
||||
|
Loading…
x
Reference in New Issue
Block a user