mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 10:03:49 +03:00
xen: Remove virConnectPtr from virXenInotifyError
This commit is contained in:
parent
67f34cd67b
commit
7ece483dce
@ -44,7 +44,7 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_XEN_INOTIFY
|
||||
|
||||
#define virXenInotifyError(conn, code, ...) \
|
||||
#define virXenInotifyError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_XEN_INOTIFY, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
@ -129,7 +129,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
|
||||
uuid_str = filename + strlen(XEND_DOMAINS_DIR) + 1;
|
||||
|
||||
if (virUUIDParse(uuid_str, rawuuid) < 0) {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("parsing uuid %s"), uuid_str);
|
||||
return -1;
|
||||
}
|
||||
@ -154,7 +154,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("finding dom on config list"));
|
||||
return -1;
|
||||
}
|
||||
@ -205,7 +205,7 @@ xenInotifyXendDomainsDirRemoveEntry(virConnectPtr conn,
|
||||
int i;
|
||||
|
||||
if (virUUIDParse(uuidstr, uuid) < 0) {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("parsing uuid %s"), uuidstr);
|
||||
return -1;
|
||||
}
|
||||
@ -241,14 +241,14 @@ xenInotifyXendDomainsDirAddEntry(virConnectPtr conn,
|
||||
xenUnifiedPrivatePtr priv = conn->privateData;
|
||||
|
||||
if (xenInotifyDomainLookup(conn, fname, &name, uuid) < 0) {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Error looking up domain"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (xenUnifiedAddDomainInfo(priv->configInfoList,
|
||||
-1, name, uuid) < 0) {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Error adding file to config cache"));
|
||||
VIR_FREE(name);
|
||||
return -1;
|
||||
@ -294,7 +294,7 @@ xenInotifyEvent(int watch ATTRIBUTE_UNUSED,
|
||||
if( conn && conn->privateData ) {
|
||||
priv = conn->privateData;
|
||||
} else {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("conn, or private data is NULL"));
|
||||
return;
|
||||
}
|
||||
@ -337,18 +337,18 @@ reread:
|
||||
if (event)
|
||||
xenUnifiedDomainEventDispatch(conn->privateData, event);
|
||||
else
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("looking up dom"));
|
||||
|
||||
if (xenInotifyRemoveDomainConfigInfo(conn, fname) < 0 ) {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Error adding file to config cache"));
|
||||
goto cleanup;
|
||||
}
|
||||
} else if (e->mask & ( IN_CREATE | IN_CLOSE_WRITE | IN_MOVED_TO) ) {
|
||||
virDomainEventPtr event;
|
||||
if (xenInotifyAddDomainConfigInfo(conn, fname) < 0 ) {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Error adding file to config cache"));
|
||||
goto cleanup;
|
||||
}
|
||||
@ -360,7 +360,7 @@ reread:
|
||||
if (event)
|
||||
xenUnifiedDomainEventDispatch(conn->privateData, event);
|
||||
else
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("looking up dom"));
|
||||
|
||||
}
|
||||
@ -423,7 +423,7 @@ xenInotifyOpen(virConnectPtr conn,
|
||||
strcat(path, ent->d_name);
|
||||
|
||||
if (xenInotifyAddDomainConfigInfo(conn, path) < 0 ) {
|
||||
virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
virXenInotifyError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("Error adding file to config list"));
|
||||
closedir(dh);
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user