提交 c8c3484b 编写于 作者: J John Ferlan

qemu: Remove type from qemuBuildSecretInfoProps

It's just a constant "secret" string anyway
上级 b95965c4
...@@ -510,7 +510,6 @@ qemuNetworkDriveGetPort(int protocol, ...@@ -510,7 +510,6 @@ qemuNetworkDriveGetPort(int protocol,
/** /**
* qemuBuildSecretInfoProps: * qemuBuildSecretInfoProps:
* @secinfo: pointer to the secret info object * @secinfo: pointer to the secret info object
* @type: returns a pointer to a character string for object name
* @props: json properties to return * @props: json properties to return
* *
* Build the JSON properties for the secret info type. * Build the JSON properties for the secret info type.
...@@ -520,14 +519,11 @@ qemuNetworkDriveGetPort(int protocol, ...@@ -520,14 +519,11 @@ qemuNetworkDriveGetPort(int protocol,
*/ */
static int static int
qemuBuildSecretInfoProps(qemuDomainSecretInfoPtr secinfo, qemuBuildSecretInfoProps(qemuDomainSecretInfoPtr secinfo,
const char **type,
virJSONValuePtr *propsret) virJSONValuePtr *propsret)
{ {
int ret = -1; int ret = -1;
char *keyid = NULL; char *keyid = NULL;
*type = "secret";
if (!(keyid = qemuDomainGetMasterKeyAlias())) if (!(keyid = qemuDomainGetMasterKeyAlias()))
return -1; return -1;
...@@ -565,13 +561,12 @@ qemuBuildObjectSecretCommandLine(virCommandPtr cmd, ...@@ -565,13 +561,12 @@ qemuBuildObjectSecretCommandLine(virCommandPtr cmd,
{ {
int ret = -1; int ret = -1;
virJSONValuePtr props = NULL; virJSONValuePtr props = NULL;
const char *type;
char *tmp = NULL; char *tmp = NULL;
if (qemuBuildSecretInfoProps(secinfo, &type, &props) < 0) if (qemuBuildSecretInfoProps(secinfo, &props) < 0)
return -1; return -1;
if (!(tmp = virQEMUBuildObjectCommandlineFromJSON(type, if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("secret",
secinfo->s.aes.alias, secinfo->s.aes.alias,
props))) props)))
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册