[PATCH 2/4] qemu: command: Pass in 'src' rather than 'disk' to qemuBuildPRManagerInfoProps

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

 



Everything is contained in the virStorageSourceStructure.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 12 +++++-------
 src/qemu/qemu_command.h |  2 +-
 src/qemu/qemu_hotplug.c |  2 +-
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 26e61f26f4..9256104f27 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9691,7 +9691,7 @@ qemuBuildPanicCommandLine(virCommandPtr cmd,

 /**
  * qemuBuildPRManagerInfoProps:
- * @disk: disk definition
+ * @src: storage source
  * @propsret: Returns JSON object containing properties of the pr-manager-helper object
  *
  * Build the JSON properties for the pr-manager object.
@@ -9700,14 +9700,12 @@ qemuBuildPanicCommandLine(virCommandPtr cmd,
  *         -1 on failure (with error message set).
  */
 int
-qemuBuildPRManagerInfoProps(const virDomainDiskDef *disk,
+qemuBuildPRManagerInfoProps(virStorageSourcePtr src,
                             virJSONValuePtr *propsret)
 {
     return qemuMonitorCreateObjectProps(propsret,
-                                        "pr-manager-helper",
-                                        disk->src->pr->mgralias,
-                                        "s:path", disk->src->pr->path,
-                                        NULL);
+                                        "pr-manager-helper", src->pr->mgralias,
+                                        "s:path", src->pr->path, NULL);
 }


@@ -9734,7 +9732,7 @@ qemuBuildMasterPRCommandLine(virCommandPtr cmd,
             managedAdded = true;
         }

-        if (qemuBuildPRManagerInfoProps(disk, &props) < 0)
+        if (qemuBuildPRManagerInfoProps(disk->src, &props) < 0)
             goto cleanup;

         if (virQEMUBuildObjectCommandlineFromJSON(&buf, props) < 0)
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index e85efcc980..60b4dcf054 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -55,7 +55,7 @@ virCommandPtr qemuBuildCommandLine(virQEMUDriverPtr driver,
                                    int **nicindexes);

 /* Generate the object properties for pr-manager */
-int qemuBuildPRManagerInfoProps(const virDomainDiskDef *disk,
+int qemuBuildPRManagerInfoProps(virStorageSourcePtr src,
                                 virJSONValuePtr *propsret);

 /* Generate the object properties for a secret */
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index c656409eaa..44bd41ccb6 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -401,7 +401,7 @@ qemuMaybeBuildPRManagerInfoProps(virDomainObjPtr vm,
         return 0;
     }

-    return qemuBuildPRManagerInfoProps(disk, propsret);
+    return qemuBuildPRManagerInfoProps(disk->src, propsret);
 }


-- 
2.16.2

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