mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 23:24:23 +03:00
qemu: Rename virQEMUBuildObjectCommandlineFromJSON
s/virQEMUBuildObjectCommandlineFromJSON/virQEMUBuildObjectCommandlineFromJSONType/ The function adds the object of a certain type. Change the name so that we make room for the generic function. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a47508d991
commit
bf26dd222f
@ -2601,7 +2601,7 @@ virQEMUBuildCommandLineJSON;
|
|||||||
virQEMUBuildCommandLineJSONArrayBitmap;
|
virQEMUBuildCommandLineJSONArrayBitmap;
|
||||||
virQEMUBuildCommandLineJSONArrayNumbered;
|
virQEMUBuildCommandLineJSONArrayNumbered;
|
||||||
virQEMUBuildDriveCommandlineFromJSON;
|
virQEMUBuildDriveCommandlineFromJSON;
|
||||||
virQEMUBuildObjectCommandlineFromJSON;
|
virQEMUBuildObjectCommandlineFromJSONType;
|
||||||
virQEMUBuildQemuImgKeySecretOpts;
|
virQEMUBuildQemuImgKeySecretOpts;
|
||||||
|
|
||||||
|
|
||||||
|
@ -550,9 +550,9 @@ qemuBuildObjectSecretCommandLine(virCommandPtr cmd,
|
|||||||
if (qemuBuildSecretInfoProps(secinfo, &props) < 0)
|
if (qemuBuildSecretInfoProps(secinfo, &props) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("secret",
|
if (!(tmp = virQEMUBuildObjectCommandlineFromJSONType("secret",
|
||||||
secinfo->s.aes.alias,
|
secinfo->s.aes.alias,
|
||||||
props)))
|
props)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virCommandAddArgList(cmd, "-object", tmp, NULL);
|
virCommandAddArgList(cmd, "-object", tmp, NULL);
|
||||||
@ -750,8 +750,8 @@ qemuBuildTLSx509CommandLine(virCommandPtr cmd,
|
|||||||
qemuCaps, &props) < 0)
|
qemuCaps, &props) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("tls-creds-x509",
|
if (!(tmp = virQEMUBuildObjectCommandlineFromJSONType("tls-creds-x509",
|
||||||
alias, props)))
|
alias, props)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virCommandAddArgList(cmd, "-object", tmp, NULL);
|
virCommandAddArgList(cmd, "-object", tmp, NULL);
|
||||||
@ -3224,9 +3224,9 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
|
|||||||
def, &mem, priv->autoNodeset, false)) < 0)
|
def, &mem, priv->autoNodeset, false)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(*backendStr = virQEMUBuildObjectCommandlineFromJSON(backendType,
|
if (!(*backendStr = virQEMUBuildObjectCommandlineFromJSONType(backendType,
|
||||||
alias,
|
alias,
|
||||||
props)))
|
props)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = rc;
|
ret = rc;
|
||||||
@ -3263,7 +3263,7 @@ qemuBuildMemoryDimmBackendStr(virDomainMemoryDefPtr mem,
|
|||||||
def, mem, priv->autoNodeset, true) < 0)
|
def, mem, priv->autoNodeset, true) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virQEMUBuildObjectCommandlineFromJSON(backendType, alias, props);
|
ret = virQEMUBuildObjectCommandlineFromJSONType(backendType, alias, props);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(alias);
|
VIR_FREE(alias);
|
||||||
@ -5560,7 +5560,7 @@ qemuBuildRNGBackendStr(virDomainRNGDefPtr rng,
|
|||||||
if (qemuBuildRNGBackendProps(rng, qemuCaps, &type, &props) < 0)
|
if (qemuBuildRNGBackendProps(rng, qemuCaps, &type, &props) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virQEMUBuildObjectCommandlineFromJSON(type, alias, props);
|
ret = virQEMUBuildObjectCommandlineFromJSONType(type, alias, props);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(alias);
|
VIR_FREE(alias);
|
||||||
@ -8826,9 +8826,9 @@ qemuBuildShmemBackendMemStr(virDomainShmemDefPtr shmem)
|
|||||||
if (virAsprintf(&alias, "shmmem-%s", shmem->info.alias) < 0)
|
if (virAsprintf(&alias, "shmmem-%s", shmem->info.alias) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virQEMUBuildObjectCommandlineFromJSON("memory-backend-file",
|
ret = virQEMUBuildObjectCommandlineFromJSONType("memory-backend-file",
|
||||||
alias,
|
alias,
|
||||||
props);
|
props);
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(alias);
|
VIR_FREE(alias);
|
||||||
virJSONValueFree(props);
|
virJSONValueFree(props);
|
||||||
@ -9766,9 +9766,9 @@ qemuBuildMasterPRCommandLine(virCommandPtr cmd,
|
|||||||
if (qemuBuildPRManagerInfoProps(disk, &props) < 0)
|
if (qemuBuildPRManagerInfoProps(disk, &props) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("pr-manager-helper",
|
if (!(tmp = virQEMUBuildObjectCommandlineFromJSONType("pr-manager-helper",
|
||||||
disk->src->pr->mgralias,
|
disk->src->pr->mgralias,
|
||||||
props)))
|
props)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
virJSONValueFree(props);
|
virJSONValueFree(props);
|
||||||
props = NULL;
|
props = NULL;
|
||||||
|
@ -242,9 +242,9 @@ virQEMUBuildCommandLineJSON(virJSONValuePtr value,
|
|||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
virQEMUBuildObjectCommandlineFromJSON(const char *type,
|
virQEMUBuildObjectCommandlineFromJSONType(const char *type,
|
||||||
const char *alias,
|
const char *alias,
|
||||||
virJSONValuePtr props)
|
virJSONValuePtr props)
|
||||||
{
|
{
|
||||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
|
@ -43,9 +43,9 @@ int virQEMUBuildCommandLineJSON(virJSONValuePtr value,
|
|||||||
virBufferPtr buf,
|
virBufferPtr buf,
|
||||||
virQEMUBuildCommandLineJSONArrayFormatFunc array);
|
virQEMUBuildCommandLineJSONArrayFormatFunc array);
|
||||||
|
|
||||||
char *virQEMUBuildObjectCommandlineFromJSON(const char *type,
|
char *virQEMUBuildObjectCommandlineFromJSONType(const char *type,
|
||||||
const char *alias,
|
const char *alias,
|
||||||
virJSONValuePtr props);
|
virJSONValuePtr props);
|
||||||
|
|
||||||
char *virQEMUBuildDriveCommandlineFromJSON(virJSONValuePtr src);
|
char *virQEMUBuildDriveCommandlineFromJSON(virJSONValuePtr src);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user