[PATCH 2/4] libxl: use virDomainObjInitJob()

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

 



This patch removes and replaces libxlDomainObjInitJob() with
general virDomainObjInitJob().

Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
 src/libxl/libxl_domain.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index ce515ec54e..e2e078bd50 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -44,19 +44,6 @@
 VIR_LOG_INIT("libxl.libxl_domain");
 
 
-static int
-libxlDomainObjInitJob(libxlDomainObjPrivate *priv)
-{
-    memset(&priv->job, 0, sizeof(priv->job));
-
-    if (virCondInit(&priv->job.cond) < 0)
-        return -1;
-
-    priv->job.current = virDomainJobDataInit(NULL);
-
-    return 0;
-}
-
 static void
 libxlDomainObjResetJob(libxlDomainObjPrivate *priv)
 {
@@ -190,12 +177,14 @@ libxlDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
         return NULL;
     }
 
-    if (libxlDomainObjInitJob(priv) < 0) {
+    if (virDomainObjInitJob(&priv->job, NULL) < 0) {
         virChrdevFree(priv->devs);
         g_free(priv);
         return NULL;
     }
 
+    priv->job.current = virDomainJobDataInit(NULL);
+
     return priv;
 }
 
-- 
2.35.3




[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