[PATCH 4/6] qemu: hotplug: Rename qemuDomainPrepareDisk to qemuHotplugPrepareDiskAccess

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

 



Match the prefix of the file and choose a name which better describes
what happens.
---
 src/qemu/qemu_hotplug.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 72a57d89ed..a49480ecb4 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -70,7 +70,7 @@ unsigned long long qemuDomainRemoveDeviceWaitTime = 1000ull * 5;


 /**
- * qemuDomainPrepareDisk:
+ * qemuHotplugPrepareDiskAccess:
  * @driver: qemu driver struct
  * @vm: domain object
  * @disk: disk to prepare
@@ -85,11 +85,11 @@ unsigned long long qemuDomainRemoveDeviceWaitTime = 1000ull * 5;
  * Returns 0 on success and -1 on error. Reports libvirt error.
  */
 static int
-qemuDomainPrepareDisk(virQEMUDriverPtr driver,
-                      virDomainObjPtr vm,
-                      virDomainDiskDefPtr disk,
-                      virStorageSourcePtr overridesrc,
-                      bool teardown)
+qemuHotplugPrepareDiskAccess(virQEMUDriverPtr driver,
+                             virDomainObjPtr vm,
+                             virDomainDiskDefPtr disk,
+                             virStorageSourcePtr overridesrc,
+                             bool teardown)
 {
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
     int ret = -1;
@@ -280,7 +280,7 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
         goto cleanup;
     }

-    if (qemuDomainPrepareDisk(driver, vm, disk, newsrc, false) < 0)
+    if (qemuHotplugPrepareDiskAccess(driver, vm, disk, newsrc, false) < 0)
         goto cleanup;

     if (!(driveAlias = qemuAliasFromDisk(disk)))
@@ -331,7 +331,7 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,

     /* remove the old source from shared device list */
     ignore_value(qemuRemoveSharedDisk(driver, disk, vm->def->name));
-    ignore_value(qemuDomainPrepareDisk(driver, vm, disk, NULL, true));
+    ignore_value(qemuHotplugPrepareDiskAccess(driver, vm, disk, NULL, true));

     virStorageSourceFree(disk->src);
     disk->src = newsrc;
@@ -345,7 +345,7 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,

  error:
     virDomainAuditDisk(vm, disk->src, newsrc, "update", false);
-    ignore_value(qemuDomainPrepareDisk(driver, vm, disk, newsrc, true));
+    ignore_value(qemuHotplugPrepareDiskAccess(driver, vm, disk, newsrc, true));
     goto cleanup;
 }

@@ -378,7 +378,7 @@ qemuDomainAttachDiskGeneric(virConnectPtr conn,
     qemuDomainSecretInfoPtr secinfo = NULL;
     qemuDomainSecretInfoPtr encinfo = NULL;

-    if (qemuDomainPrepareDisk(driver, vm, disk, NULL, false) < 0)
+    if (qemuHotplugPrepareDiskAccess(driver, vm, disk, NULL, false) < 0)
         goto cleanup;

     if (qemuAssignDeviceDiskAlias(vm->def, disk, priv->qemuCaps) < 0)
@@ -486,7 +486,7 @@ qemuDomainAttachDiskGeneric(virConnectPtr conn,

  error:
     qemuDomainDelDiskSrcTLSObject(driver, vm, disk->src);
-    ignore_value(qemuDomainPrepareDisk(driver, vm, disk, NULL, true));
+    ignore_value(qemuHotplugPrepareDiskAccess(driver, vm, disk, NULL, true));
     goto cleanup;
 }

-- 
2.14.3

--
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