Re: [PATCH] vz: Adapt to driver rename

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

 



On 06/25/2015 11:14 AM, Michal Privoznik wrote:
In the e6d180f07fb06 commit the parallels driver was renamed to vz.
However, there was a commit merged later, which was sent to the list
before the rename. The other commit is 6de12b026b73. Fix all the
missing renames.

Sorry, something is broken in my desktop, and libvirt doesn't compile with prlsdk, so I missed it. Thanks for the patch!


Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---

Pushed under build breaker rule.

  src/vz/vz_sdk.c | 23 ++++++++++++++++-------
  src/vz/vz_sdk.h |  4 ++--
  2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 1a3aa87..388ea19 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -2885,14 +2885,20 @@ static int prlsdkAddNet(PRL_HANDLE sdkdom,
      return ret;
  }
-static void prlsdkDelNet(vzConnPtr privconn, virDomainNetDefPtr net)
+static int
+prlsdkDelNet(vzConnPtr privconn, virDomainNetDefPtr net)
  {
+    int ret = -1;
      PRL_RESULT pret;
      PRL_HANDLE vnet = PRL_INVALID_HANDLE;
      PRL_HANDLE job = PRL_INVALID_HANDLE;
- if (net->type != VIR_DOMAIN_NET_TYPE_BRIDGE)
-        return;
+    if (net->type != VIR_DOMAIN_NET_TYPE_BRIDGE) {
+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+                       _("unplugging network device of type %s is not supported"),
+                       virDomainNetTypeToString(net->type));
+        return ret;
+    }
pret = PrlVirtNet_Create(&vnet);
      prlsdkCheckRetGoto(pret, cleanup);
@@ -2904,16 +2910,19 @@ static void prlsdkDelNet(vzConnPtr privconn, virDomainNetDefPtr net)
      if (PRL_FAILED(pret = waitJob(job)))
          goto cleanup;
+ ret = 0;
+
   cleanup:
      PrlHandle_Free(vnet);
+    return ret;
  }
int prlsdkAttachNet(virDomainObjPtr dom,
-                    parallelsConnPtr privconn,
+                    vzConnPtr privconn,
                      virDomainNetDefPtr net)
  {
      int ret = -1;
-    parallelsDomObjPtr privdom = dom->privateData;
+    vzDomObjPtr privdom = dom->privateData;
      PRL_HANDLE job = PRL_INVALID_HANDLE;
if (!IS_CT(dom->def)) {
@@ -2998,11 +3007,11 @@ static int prlsdkDelNetAdapter(PRL_HANDLE sdkdom, int idx)
  }
int prlsdkDetachNet(virDomainObjPtr dom,
-                    parallelsConnPtr privconn,
+                    vzConnPtr privconn,
                      virDomainNetDefPtr net)
  {
      int ret = -1, idx = -1;
-    parallelsDomObjPtr privdom = dom->privateData;
+    vzDomObjPtr privdom = dom->privateData;
      PRL_HANDLE job = PRL_INVALID_HANDLE;
if (!IS_CT(dom->def)) {
diff --git a/src/vz/vz_sdk.h b/src/vz/vz_sdk.h
index cde8904..80ff69a 100644
--- a/src/vz/vz_sdk.h
+++ b/src/vz/vz_sdk.h
@@ -67,6 +67,6 @@ prlsdkDetachVolume(virDomainObjPtr dom, virDomainDiskDefPtr disk);
  int
  prlsdkGetBlockStats(virDomainObjPtr dom, virDomainDiskDefPtr disk, virDomainBlockStatsPtr stats);
  int
-prlsdkAttachNet(virDomainObjPtr dom, parallelsConnPtr privconn, virDomainNetDefPtr net);
+prlsdkAttachNet(virDomainObjPtr dom, vzConnPtr privconn, virDomainNetDefPtr net);
  int
-prlsdkDetachNet(virDomainObjPtr dom, parallelsConnPtr privconn, virDomainNetDefPtr net);
+prlsdkDetachNet(virDomainObjPtr dom, vzConnPtr privconn, virDomainNetDefPtr net);


--
Dmitry Guryanov

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