mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
Replace use of xenapiError with virReportError
Update the XenAPI driver to use virReportError instead of the xenapiError custom macro Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
3b7399b5c9
commit
bd7c36c57e
@ -43,10 +43,6 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_XENAPI
|
#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)
|
static int xenapiDefaultConsoleType(const char *ostype)
|
||||||
{
|
{
|
||||||
@ -1123,7 +1119,7 @@ xenapiDomainSetVcpusFlags (virDomainPtr dom, unsigned int nvcpus,
|
|||||||
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
||||||
|
|
||||||
if (flags != VIR_DOMAIN_VCPU_LIVE) {
|
if (flags != VIR_DOMAIN_VCPU_LIVE) {
|
||||||
xenapiError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
|
virReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
|
||||||
flags);
|
flags);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1293,7 +1289,7 @@ xenapiDomainGetVcpusFlags (virDomainPtr dom, unsigned int flags)
|
|||||||
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
||||||
|
|
||||||
if (flags != (VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_MAXIMUM)) {
|
if (flags != (VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_MAXIMUM)) {
|
||||||
xenapiError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
|
virReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
|
||||||
flags);
|
flags);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user