提交 67f34cd6 编写于 作者: M Matthias Bolte

xen: Remove virConnectPtr from virXenStoreError

上级 68d5d96b
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册