diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-07-18 14:48:05 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2012-07-20 15:10:54 +0100 |
commit | e48daff7bb7010041e8fe1cf08b9f31ecde24700 (patch) | |
tree | d4dfb32c501aec7214232a7f7a7e62a962406f0d /src/xen/xen_inotify.c | |
parent | 95218aa49fbca35f7f04bb6032d3b4569553c466 (diff) | |
download | libvirt-e48daff7bb7010041e8fe1cf08b9f31ecde24700.tar.gz |
Replace use of custom macros with virReportError in the Xen drivers
Update the legacy Xen drivers to use virReportError instead of
the statsError, virXenInotifyError, virXenStoreError,
virXendError, xenUnifiedError, xenXMError custom macros
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'src/xen/xen_inotify.c')
-rw-r--r-- | src/xen/xen_inotify.c | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c index f7495b5d34..7185366aef 100644 --- a/src/xen/xen_inotify.c +++ b/src/xen/xen_inotify.c @@ -44,10 +44,6 @@ #define VIR_FROM_THIS VIR_FROM_XEN_INOTIFY -#define virXenInotifyError(code, ...) \ - virReportErrorHelper(VIR_FROM_XEN_INOTIFY, code, __FILE__, \ - __FUNCTION__, __LINE__, __VA_ARGS__) - struct xenUnifiedDriver xenInotifyDriver = { .xenClose = xenInotifyClose, }; @@ -91,8 +87,8 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename, uuid_str = filename + strlen(XEND_DOMAINS_DIR) + 1; if (virUUIDParse(uuid_str, rawuuid) < 0) { - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - _("parsing uuid %s"), uuid_str); + virReportError(VIR_ERR_INTERNAL_ERROR, + _("parsing uuid %s"), uuid_str); return -1; } /* call directly into xend here, as driver may not yet @@ -116,8 +112,8 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename, return 0; } } - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("finding dom on config list")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("finding dom on config list")); return -1; } @@ -168,8 +164,8 @@ xenInotifyXendDomainsDirRemoveEntry(virConnectPtr conn, int i; if (virUUIDParse(uuidstr, uuid) < 0) { - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - _("parsing uuid %s"), uuidstr); + virReportError(VIR_ERR_INTERNAL_ERROR, + _("parsing uuid %s"), uuidstr); return -1; } @@ -204,15 +200,15 @@ xenInotifyXendDomainsDirAddEntry(virConnectPtr conn, xenUnifiedPrivatePtr priv = conn->privateData; if (xenInotifyDomainLookup(conn, fname, &name, uuid) < 0) { - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("Error looking up domain")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Error looking up domain")); return -1; } if (xenUnifiedAddDomainInfo(priv->configInfoList, -1, name, uuid) < 0) { - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("Error adding file to config cache")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Error adding file to config cache")); VIR_FREE(name); return -1; } @@ -257,8 +253,8 @@ xenInotifyEvent(int watch ATTRIBUTE_UNUSED, if( conn && conn->privateData ) { priv = conn->privateData; } else { - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("conn, or private data is NULL")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("conn, or private data is NULL")); return; } @@ -300,19 +296,19 @@ reread: if (event) xenUnifiedDomainEventDispatch(conn->privateData, event); else - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("looking up dom")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("looking up dom")); if (xenInotifyRemoveDomainConfigInfo(conn, fname) < 0 ) { - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("Error adding file to config cache")); + virReportError(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(VIR_ERR_INTERNAL_ERROR, - "%s", _("Error adding file to config cache")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Error adding file to config cache")); goto cleanup; } @@ -323,8 +319,8 @@ reread: if (event) xenUnifiedDomainEventDispatch(conn->privateData, event); else - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("looking up dom")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("looking up dom")); } @@ -386,8 +382,8 @@ xenInotifyOpen(virConnectPtr conn, } if (xenInotifyAddDomainConfigInfo(conn, path) < 0 ) { - virXenInotifyError(VIR_ERR_INTERNAL_ERROR, - "%s", _("Error adding file to config list")); + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Error adding file to config list")); closedir(dh); VIR_FREE(path); return -1; |