--- src/xen/xs_internal.c | 43 +++++++++++++++++++------------------------ 1 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c index 466169d..9296f25 100644 --- a/src/xen/xs_internal.c +++ b/src/xen/xs_internal.c @@ -88,7 +88,7 @@ struct xenUnifiedDriver xenStoreDriver = { #endif /* ! PROXY */ -#define virXenStoreError(conn, code, ...) \ +#define virXenStoreError(code, ...) \ virReportErrorHelper(NULL, VIR_FROM_XENSTORE, code, __FILE__, \ __FUNCTION__, __LINE__, __VA_ARGS__) @@ -297,8 +297,8 @@ xenStoreOpen(virConnectPtr conn, * remote) mechanism. */ if (xenHavePrivilege()) { - virXenStoreError(NULL, VIR_ERR_NO_XEN, - "%s", _("failed to connect to Xen Store")); + virXenStoreError(VIR_ERR_NO_XEN, + "%s", _("failed to connect to Xen Store")); } return (-1); } @@ -322,8 +322,8 @@ xenStoreOpen(virConnectPtr conn, if ( xenStoreAddWatch(conn, "@releaseDomain", "releaseDomain", xenStoreDomainReleased, priv) < 0 ) { - virXenStoreError(NULL, VIR_ERR_INTERNAL_ERROR, - "%s", _("adding watch @releaseDomain")); + virXenStoreError(VIR_ERR_INTERNAL_ERROR, + "%s", _("adding watch @releaseDomain")); return -1; } @@ -331,8 +331,8 @@ xenStoreOpen(virConnectPtr conn, if( xenStoreAddWatch(conn, "@introduceDomain", "introduceDomain", xenStoreDomainIntroduced, priv) < 0 ) { - virXenStoreError(NULL, VIR_ERR_INTERNAL_ERROR, - "%s", _("adding watch @introduceDomain")); + virXenStoreError(VIR_ERR_INTERNAL_ERROR, + "%s", _("adding watch @introduceDomain")); return -1; } @@ -362,7 +362,7 @@ xenStoreClose(virConnectPtr conn) xenUnifiedPrivatePtr priv; if (conn == NULL) { - virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(-1); } @@ -419,8 +419,7 @@ xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info) return (-1); if ((domain == NULL) || (domain->conn == NULL) || (info == NULL)) { - virXenStoreError(domain ? domain->conn : NULL, VIR_ERR_INVALID_ARG, - __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(-1); } @@ -485,8 +484,7 @@ xenStoreDomainSetMemory(virDomainPtr domain, unsigned long memory) if ((domain == NULL) || (domain->conn == NULL) || (memory < 1024 * MIN_XEN_GUEST_SIZE)) { - virXenStoreError(domain ? domain->conn : NULL, VIR_ERR_INVALID_ARG, - __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(-1); } if (domain->id == -1) @@ -550,13 +548,13 @@ xenStoreNumOfDomains(virConnectPtr conn) xenUnifiedPrivatePtr priv; if (conn == NULL) { - virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return -1; } priv = (xenUnifiedPrivatePtr) conn->privateData; if (priv->xshandle == NULL) { - virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(-1); } @@ -638,7 +636,7 @@ xenStoreListDomains(virConnectPtr conn, int *ids, int maxids) int ret; if ((conn == NULL) || (ids == NULL)) { - virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(-1); } @@ -673,7 +671,7 @@ xenStoreLookupByName(virConnectPtr conn, const char *name) xenUnifiedPrivatePtr priv; if ((conn == NULL) || (name == NULL)) { - virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(NULL); } @@ -737,8 +735,7 @@ xenStoreDomainShutdown(virDomainPtr domain) xenUnifiedPrivatePtr priv; if ((domain == NULL) || (domain->conn == NULL)) { - virXenStoreError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG, - __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(-1); } if (domain->id == -1 || domain->id == 0) @@ -772,8 +769,7 @@ xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED) xenUnifiedPrivatePtr priv; if ((domain == NULL) || (domain->conn == NULL)) { - virXenStoreError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG, - __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(-1); } if (domain->id == -1 || domain->id == 0) @@ -803,8 +799,7 @@ xenStoreDomainGetOSType(virDomainPtr domain) { char *vm, *str = NULL; if ((domain == NULL) || (domain->conn == NULL)) { - virXenStoreError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG, - __FUNCTION__); + virXenStoreError(VIR_ERR_INVALID_ARG, __FUNCTION__); return(NULL); } @@ -1200,8 +1195,8 @@ int xenStoreAddWatch(virConnectPtr conn, for (n=0; n < list->count; n++) { if( STREQ(list->watches[n]->path, path) && STREQ(list->watches[n]->token, token)) { - virXenStoreError(NULL, VIR_ERR_INTERNAL_ERROR, - "%s", _("watch already tracked")); + virXenStoreError(VIR_ERR_INTERNAL_ERROR, + "%s", _("watch already tracked")); return -1; } } -- 1.6.3.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list