]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: command: Remove qemuBuildGeneralSecinfoURI
authorPeter Krempa <pkrempa@redhat.com>
Tue, 21 Sep 2021 16:24:55 +0000 (18:24 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 22 Sep 2021 12:53:56 +0000 (14:53 +0200)
After removal of plaintext secrets this function is a noop.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c

index 6e8699a3c6f225c327d02f486a1ff4a73903a3ea..60b47573d528c95c8607b978a3b77b7ac0c6081f 100644 (file)
@@ -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: