[RFC 5/7] Deprecate virConnectNumOfDomains()

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

 



In this case we want to deprecate the API wholesale, so we
can simply report a warning in the public entry point.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/libvirt-domain.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 7690339521..a758539b6d 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -97,6 +97,11 @@ virConnectNumOfDomains(virConnectPtr conn)
         int ret = conn->driver->connectNumOfDomains(conn);
         if (ret < 0)
             goto error;
+
+        virReportWarning(VIR_ERR_DEPRECATED_FEATURE,
+                         "%s",
+                         "virConnectNumOfDomains()");
+        virDispatchError(conn);
         return ret;
     }
 
-- 
2.17.1

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