From 928bc193990190e443ed41e5ed6b4c2b14de7241 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 21 Sep 2021 18:24:55 +0200 Subject: [PATCH] qemu: command: Remove qemuBuildGeneralSecinfoURI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After removal of plaintext secrets this function is a noop. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/qemu/qemu_command.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6e8699a3c6..60b47573d5 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -748,34 +748,6 @@ qemuBuildObjectSecretCommandLine(virCommand *cmd, } -/* qemuBuildGeneralSecinfoURI: - * @uri: Pointer to the URI structure to add to - * @secinfo: Pointer to the secret info data (if present) - * - * If we have a secinfo, then build the command line options for - * the secret info for the "general" case (somewhat a misnomer since - * an iscsi disk is the only one with a secinfo). - * - * Returns 0 on success or if no secinfo, - * -1 and error message if fail to add secret information - */ -static int -qemuBuildGeneralSecinfoURI(virURI *uri G_GNUC_UNUSED, - qemuDomainSecretInfo *secinfo) -{ - if (!secinfo) - return 0; - - switch ((qemuDomainSecretInfoType) secinfo->type) { - case VIR_DOMAIN_SECRET_INFO_TYPE_AES: - case VIR_DOMAIN_SECRET_INFO_TYPE_LAST: - return -1; - } - - return 0; -} - - /* qemuBuildRBDSecinfoURI: * @uri: Pointer to the URI structure to add to * @secinfo: Pointer to the secret info data (if present) @@ -891,8 +863,7 @@ qemuBuildTLSx509CommandLine(virCommand *cmd, static char * -qemuBuildNetworkDriveURI(virStorageSource *src, - qemuDomainSecretInfo *secinfo) +qemuBuildNetworkDriveURI(virStorageSource *src) { g_autoptr(virURI) uri = NULL; @@ -902,9 +873,6 @@ qemuBuildNetworkDriveURI(virStorageSource *src, if (src->hosts->socket) uri->query = g_strdup_printf("socket=%s", src->hosts->socket); - if (qemuBuildGeneralSecinfoURI(uri, secinfo) < 0) - return NULL; - return virURIFormat(uri); } @@ -965,7 +933,7 @@ qemuBuildNetworkDriveStr(virStorageSource *src, return virBufferContentAndReset(&buf); } /* NBD code uses URI formatting scheme as others in some cases */ - ret = qemuBuildNetworkDriveURI(src, secinfo); + ret = qemuBuildNetworkDriveURI(src); break; case VIR_STORAGE_NET_PROTOCOL_HTTP: @@ -975,7 +943,7 @@ qemuBuildNetworkDriveStr(virStorageSource *src, case VIR_STORAGE_NET_PROTOCOL_TFTP: case VIR_STORAGE_NET_PROTOCOL_ISCSI: case VIR_STORAGE_NET_PROTOCOL_GLUSTER: - ret = qemuBuildNetworkDriveURI(src, secinfo); + ret = qemuBuildNetworkDriveURI(src); break; case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG: