and its companion param VIR_SAVE_PARAM_PARALLEL_CONNECTIONS.
Signed-off-by: Claudio Fontana <cfontana(a)suse.de>
---
src/qemu/qemu_driver.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1c3e944064..d8a80da589 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5815,6 +5815,7 @@ static int
qemuDomainRestoreInternal(virConnectPtr conn,
const char *path,
const char *dxml,
+ int nchannels G_GNUC_UNUSED,
unsigned int flags,
int (*ensureACL)(virConnectPtr, virDomainDef *))
{
@@ -5834,7 +5835,8 @@ qemuDomainRestoreInternal(virConnectPtr conn,
virCheckFlags(VIR_DOMAIN_SAVE_BYPASS_CACHE |
VIR_DOMAIN_SAVE_RUNNING |
VIR_DOMAIN_SAVE_PAUSED |
- VIR_DOMAIN_SAVE_RESET_NVRAM, -1);
+ VIR_DOMAIN_SAVE_RESET_NVRAM |
+ VIR_DOMAIN_SAVE_PARALLEL, -1);
if (flags & VIR_DOMAIN_SAVE_RESET_NVRAM)
reset_nvram = true;
@@ -5919,7 +5921,7 @@ qemuDomainRestoreFlags(virConnectPtr conn,
const char *dxml,
unsigned int flags)
{
- return qemuDomainRestoreInternal(conn, path, dxml, flags,
+ return qemuDomainRestoreInternal(conn, path, dxml, -1, flags,
virDomainRestoreFlagsEnsureACL);
}
@@ -5927,7 +5929,7 @@ static int
qemuDomainRestore(virConnectPtr conn,
const char *path)
{
- return qemuDomainRestoreInternal(conn, path, NULL, 0,
+ return qemuDomainRestoreInternal(conn, path, NULL, -1, 0,
virDomainRestoreEnsureACL);
}
@@ -5939,10 +5941,12 @@ qemuDomainRestoreParams(virConnectPtr conn,
const char *path = NULL;
const char *dxml = NULL;
int ret = -1;
+ int nchannels = 2;
if (virTypedParamsValidate(params, nparams,
VIR_SAVE_PARAM_FILE, VIR_TYPED_PARAM_STRING,
VIR_SAVE_PARAM_DXML, VIR_TYPED_PARAM_STRING,
+ VIR_SAVE_PARAM_PARALLEL_CONNECTIONS, VIR_TYPED_PARAM_INT,
NULL) < 0)
return -1;
@@ -5950,8 +5954,10 @@ qemuDomainRestoreParams(virConnectPtr conn,
return -1;
if (virTypedParamsGetString(params, nparams, VIR_SAVE_PARAM_DXML, &dxml) < 0)
return -1;
+ if (virTypedParamsGetInt(params, nparams, VIR_SAVE_PARAM_PARALLEL_CONNECTIONS,
&nchannels) < 0)
+ return -1;
- ret = qemuDomainRestoreInternal(conn, path, dxml, flags,
+ ret = qemuDomainRestoreInternal(conn, path, dxml, nchannels, flags,
virDomainRestoreParamsEnsureACL);
return ret;
}
--
2.34.1