]> xenbits.xensource.com Git - libvirt.git/commitdiff
Replace use of xenapiError with virReportError
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 18 Jul 2012 18:25:00 +0000 (19:25 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 19 Jul 2012 13:42:53 +0000 (14:42 +0100)
Update the XenAPI driver to use virReportError instead of
the xenapiError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/xenapi/xenapi_driver.c

index a91f497958786b2b960a84766fbb0f5f476925d8..38a7cd0f6270e8135ca940969f0ede9809c28489 100644 (file)
 
 #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;
     }