[PATCH 10/12] qemu: domain: Remove pointless alias check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When attaching the disks, aliases are always generated.
---
 src/qemu/qemu_domain.c  | 8 --------
 src/qemu/qemu_domain.h  | 3 +--
 src/qemu/qemu_hotplug.c | 2 +-
 src/qemu/qemu_process.c | 2 +-
 4 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c689911c4..aebe24e7b 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7833,7 +7833,6 @@ qemuDomainPrepareChardevSource(virDomainDefPtr def,

 /* qemuProcessPrepareDiskSourceTLS:
  * @source: pointer to host interface data for disk device
- * @diskAlias: alias use for the disk device
  * @cfg: driver configuration
  *
  * Updates host interface TLS encryption setting based on qemu.conf
@@ -7844,7 +7843,6 @@ qemuDomainPrepareChardevSource(virDomainDefPtr def,
  */
 int
 qemuDomainPrepareDiskSourceTLS(virStorageSourcePtr src,
-                               const char *diskAlias,
                                virQEMUDriverConfigPtr cfg)
 {

@@ -7863,12 +7861,6 @@ qemuDomainPrepareDiskSourceTLS(virStorageSourcePtr src,
         }

         if (src->haveTLS == VIR_TRISTATE_BOOL_YES) {
-            if (!diskAlias) {
-                virReportError(VIR_ERR_INVALID_ARG, "%s",
-                               _("disk does not have an alias"));
-                return -1;
-            }
-
             /* Grab the vxhsTLSx509certdir and set the verify/listen values.
              * NB: tlsAlias filled in during qemuDomainGetTLSObjects. */
             if (VIR_STRDUP(src->tlsCertdir, cfg->vxhsTLSx509certdir) < 0)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index a8ad59d20..6615dabf9 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -882,9 +882,8 @@ void qemuDomainPrepareChardevSource(virDomainDefPtr def,

 int
 qemuDomainPrepareDiskSourceTLS(virStorageSourcePtr src,
-                               const char *diskAlias,
                                virQEMUDriverConfigPtr cfg)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

 int qemuDomainPrepareShmemChardev(virDomainShmemDefPtr shmem)
     ATTRIBUTE_NONNULL(1);
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 91f7f9ed6..e4157f631 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -394,7 +394,7 @@ qemuDomainAttachDiskGeneric(virConnectPtr conn,
     if (encinfo && qemuBuildSecretInfoProps(encinfo, &encobjProps) < 0)
         goto error;

-    if (qemuDomainPrepareDiskSourceTLS(disk->src, disk->info.alias, cfg) < 0)
+    if (qemuDomainPrepareDiskSourceTLS(disk->src, cfg) < 0)
         goto error;

     if (disk->src->haveTLS &&
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 66e81bbe5..9bbfabcde 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5301,7 +5301,7 @@ qemuProcessPrepareDomainStorage(virConnectPtr conn,
             continue;
         }

-        if (qemuDomainPrepareDiskSourceTLS(disk->src, disk->info.alias, cfg) < 0)
+        if (qemuDomainPrepareDiskSourceTLS(disk->src, cfg) < 0)
             return -1;
     }

-- 
2.14.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux