mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
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:
parent
1ce205f93e
commit
8fabea221c
@ -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;
|
||||
}
|
||||
|
@ -291,10 +291,6 @@ qemuMigrationSrcFetchMirrorStats(virQEMUDriverPtr driver,
|
||||
qemuDomainAsyncJob asyncJob,
|
||||
qemuDomainJobInfoPtr jobInfo);
|
||||
|
||||
bool
|
||||
qemuMigrationCapsGet(virDomainObjPtr vm,
|
||||
qemuMonitorMigrationCaps cap);
|
||||
|
||||
int
|
||||
qemuMigrationOptionSet(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -84,4 +84,8 @@ qemuMigrationCapsCheck(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int asyncJob);
|
||||
|
||||
bool
|
||||
qemuMigrationCapsGet(virDomainObjPtr vm,
|
||||
qemuMonitorMigrationCaps cap);
|
||||
|
||||
#endif /* __QEMU_MIGRATION_PARAMS_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user