[PATCH 21/23] Replace use of xenapiError with virReportError

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

Update the XenAPI driver to use virReportError instead of
the xenapiError custom macro

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/xenapi/xenapi_driver.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index a91f497..38a7cd0 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -43,10 +43,6 @@
 
 #define VIR_FROM_THIS VIR_FROM_XENAPI
 
-#define xenapiError(code, ...)                                    \
-        virReportErrorHelper(VIR_FROM_THIS, code, __FILE__,       \
-                             __FUNCTION__, __LINE__, __VA_ARGS__)
-
 
 static int xenapiDefaultConsoleType(const char *ostype)
 {
@@ -1123,8 +1119,8 @@ xenapiDomainSetVcpusFlags (virDomainPtr dom, unsigned int nvcpus,
     xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
 
     if (flags != VIR_DOMAIN_VCPU_LIVE) {
-        xenapiError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
-                    flags);
+        virReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
+                       flags);
         return -1;
     }
 
@@ -1293,8 +1289,8 @@ xenapiDomainGetVcpusFlags (virDomainPtr dom, unsigned int flags)
     xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
 
     if (flags != (VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_MAXIMUM)) {
-        xenapiError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
-                    flags);
+        virReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
+                       flags);
         return -1;
     }
 
-- 
1.7.10.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]