[PATCH 2/2] Clean up after virNetDevIP creation

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

 



Commit cf0568b0af4e moved a bunch of functions from virNetDev
to the more specific virNetDevIP; however, not all of the
existing uses were moved properly, causing build failures on
FreeBSD.

Complete the transition to the new names and drop the
obsolete declarations from the header file while at it.
---
 src/util/virnetdev.h     | 21 ---------------------
 src/util/virnetdevip.c   |  4 ++--
 tests/qemuxml2argvmock.c |  9 +++++----
 3 files changed, 7 insertions(+), 27 deletions(-)

diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h
index 849f8e7..c3e8ffc 100644
--- a/src/util/virnetdev.h
+++ b/src/util/virnetdev.h
@@ -124,27 +124,6 @@ int virNetDevGetOnline(const char *ifname,
                       bool *online)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
 
-int virNetDevSetIPAddress(const char *ifname,
-                          virSocketAddr *addr,
-                          virSocketAddr *peer,
-                          unsigned int prefix)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
-int virNetDevAddRoute(const char *ifname,
-                      virSocketAddrPtr addr,
-                      unsigned int prefix,
-                      virSocketAddrPtr gateway,
-                      unsigned int metric)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_RETURN_CHECK;
-int virNetDevClearIPAddress(const char *ifname,
-                            virSocketAddr *addr,
-                            unsigned int prefix)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
-int virNetDevGetIPAddress(const char *ifname, virSocketAddrPtr addr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
-int virNetDevWaitDadFinish(virSocketAddrPtr *addrs, size_t count)
-    ATTRIBUTE_NONNULL(1);
-
 
 int virNetDevSetMAC(const char *ifname,
                     const virMacAddr *macaddr)
diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c
index 20f3ae1..f8b04e4 100644
--- a/src/util/virnetdevip.c
+++ b/src/util/virnetdevip.c
@@ -647,8 +647,8 @@ virNetDevIPRouteAdd(const char *ifname,
 
 /* return after DAD finishes for all known IPv6 addresses or an error */
 int
-virNetDevWaitDadFinish(virSocketAddrPtr *addrs ATTRIBUTE_UNUSED,
-                       size_t count ATTRIBUTE_UNUSED)
+virNetDevIPWaitDadFinish(virSocketAddrPtr *addrs ATTRIBUTE_UNUSED,
+                         size_t count ATTRIBUTE_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
                          _("Unable to wait for IPv6 DAD on this platform"));
diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index b99496a..e0ec2db 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -26,6 +26,7 @@
 #include "vircrypto.h"
 #include "virmock.h"
 #include "virnetdev.h"
+#include "virnetdevip.h"
 #include "virnetdevtap.h"
 #include "virnuma.h"
 #include "virrandom.h"
@@ -127,10 +128,10 @@ virNetDevSetMAC(const char *ifname ATTRIBUTE_UNUSED,
     return 0;
 }
 
-int virNetDevSetIPAddress(const char *ifname ATTRIBUTE_UNUSED,
-                          virSocketAddr *addr ATTRIBUTE_UNUSED,
-                          virSocketAddr *peer ATTRIBUTE_UNUSED,
-                          unsigned int prefix ATTRIBUTE_UNUSED)
+int virNetDevIPAddrAdd(const char *ifname ATTRIBUTE_UNUSED,
+                       virSocketAddr *addr ATTRIBUTE_UNUSED,
+                       virSocketAddr *peer ATTRIBUTE_UNUSED,
+                       unsigned int prefix ATTRIBUTE_UNUSED)
 {
     return 0;
 }
-- 
2.7.4

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