Re: [PATCH 09/18] vz: dump ip addresses to domain xml

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

 



20.04.2016 17:05, Nikolay Shirokovskiy пишет:

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
  src/libvirt_private.syms |  1 +
  src/vz/vz_sdk.c          | 88 ++++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 89 insertions(+)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 2b55369..3f2845b 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2185,6 +2185,7 @@ virSocketAddrEqual;
  virSocketAddrFormat;
  virSocketAddrFormatFull;
  virSocketAddrGetIpPrefix;
+virSocketAddrGetNumNetmaskBits;
  virSocketAddrGetPort;
  virSocketAddrGetRange;
  virSocketAddrIsNetmask;
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 29b31a2..db85558 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -727,6 +727,91 @@ prlsdkAddDomainOpticalDisksInfo(vzDriverPtr driver, PRL_HANDLE sdkdom, virDomain
      return -1;
  }
+static virDomainNetIpDefPtr
+prlsdkParseNetAddress(char *addr)
+{
+    char *maskstr = NULL;
+    int nbits;
+    virSocketAddr mask;
+    virDomainNetIpDefPtr ip = NULL, ret = NULL;
+
+    if (!(maskstr = strchr(addr, '/')))
+        goto cleanup;
+
+    *maskstr = '\0';
+    ++maskstr;

why not *maskstr++ = '\0';  ?

Anyway, ACK :)

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