qemu: Move qemuMigrationCapsGet

The function is connected with the code which handles migration
parameters and capabilities, let's move it to qemu_migration_params.c.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2018-04-06 15:22:51 +02:00
parent 1ce205f93e
commit 8fabea221c
4 changed files with 18 additions and 18 deletions

View File

@ -5740,17 +5740,3 @@ qemuMigrationSrcFetchMirrorStats(virQEMUDriverPtr driver,
virHashFree(blockinfo);
return 0;
}
bool
qemuMigrationCapsGet(virDomainObjPtr vm,
qemuMonitorMigrationCaps cap)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
bool enabled = false;
if (priv->migrationCaps)
ignore_value(virBitmapGetBit(priv->migrationCaps, cap, &enabled));
return enabled;
}

View File

@ -291,10 +291,6 @@ qemuMigrationSrcFetchMirrorStats(virQEMUDriverPtr driver,
qemuDomainAsyncJob asyncJob,
qemuDomainJobInfoPtr jobInfo);
bool
qemuMigrationCapsGet(virDomainObjPtr vm,
qemuMonitorMigrationCaps cap);
int
qemuMigrationOptionSet(virQEMUDriverPtr driver,
virDomainObjPtr vm,

View File

@ -524,3 +524,17 @@ qemuMigrationCapsCheck(virQEMUDriverPtr driver,
virStringListFree(caps);
return ret;
}
bool
qemuMigrationCapsGet(virDomainObjPtr vm,
qemuMonitorMigrationCaps cap)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
bool enabled = false;
if (priv->migrationCaps)
ignore_value(virBitmapGetBit(priv->migrationCaps, cap, &enabled));
return enabled;
}

View File

@ -84,4 +84,8 @@ qemuMigrationCapsCheck(virQEMUDriverPtr driver,
virDomainObjPtr vm,
int asyncJob);
bool
qemuMigrationCapsGet(virDomainObjPtr vm,
qemuMonitorMigrationCaps cap);
#endif /* __QEMU_MIGRATION_PARAMS_H__ */