maint: update list of error function names and adapt

* Makefile.maint (msg_gen_function): Update list.
Remove some now-unused names, add some new ones.
* src/hash.c (virHashError): Remove unused definition.
* src/openvz_conf.h (openvzLog): Likewise.
* src/xen_unified.c: Mark newly-exposed diagnostics for translation.
This commit is contained in:
Jim Meyering 2009-01-23 12:29:29 +00:00
parent e80f10064e
commit 6278bb191a
5 changed files with 17 additions and 21 deletions

View File

@ -1,3 +1,12 @@
Fri Jan 23 12:44:44 +0100 2009 Jim Meyering <meyering@redhat.com>
maint: update list of error function names and adapt
* Makefile.maint (msg_gen_function): Update list.
Remove some now-unused names, add some new ones.
* src/hash.c (virHashError): Remove unused definition.
* src/openvz_conf.h (openvzLog): Likewise.
* src/xen_unified.c: Mark newly-exposed diagnostics for translation.
Thu Jan 22 17:42:37 PST 2009 John Levon <john.levon@sun.com> Thu Jan 22 17:42:37 PST 2009 John Levon <john.levon@sun.com>
* src/domain_conf.c, src/domain_conf.h, src/xend_internal.c, * src/domain_conf.c, src/domain_conf.h, src/xend_internal.c,

View File

@ -390,6 +390,7 @@ msg_gen_function += ERROR0
msg_gen_function += REMOTE_DEBUG msg_gen_function += REMOTE_DEBUG
msg_gen_function += ReportError msg_gen_function += ReportError
msg_gen_function += VIR_FREE msg_gen_function += VIR_FREE
msg_gen_function += VIR_INFO
msg_gen_function += VIR_USE_CPU msg_gen_function += VIR_USE_CPU
msg_gen_function += errorf msg_gen_function += errorf
msg_gen_function += lxcError msg_gen_function += lxcError
@ -401,9 +402,7 @@ msg_gen_function += qemudDispatchClientFailure
msg_gen_function += qemudLog msg_gen_function += qemudLog
msg_gen_function += qemudReportError msg_gen_function += qemudReportError
msg_gen_function += regerror msg_gen_function += regerror
msg_gen_function += remoteDispatchError
msg_gen_function += remoteDispatchFormatError msg_gen_function += remoteDispatchFormatError
msg_gen_function += umlError
msg_gen_function += umlLog msg_gen_function += umlLog
msg_gen_function += umlReportError msg_gen_function += umlReportError
msg_gen_function += virConfError msg_gen_function += virConfError
@ -414,18 +413,19 @@ msg_gen_function += virLibDomainError
msg_gen_function += virLog msg_gen_function += virLog
msg_gen_function += virNetworkReportError msg_gen_function += virNetworkReportError
msg_gen_function += virNodeDeviceReportError msg_gen_function += virNodeDeviceReportError
msg_gen_function += virProxyError
msg_gen_function += virRaiseError msg_gen_function += virRaiseError
msg_gen_function += virReportErrorHelper msg_gen_function += virReportErrorHelper
msg_gen_function += virReportSystemError
msg_gen_function += virSexprError msg_gen_function += virSexprError
msg_gen_function += virStorageLog msg_gen_function += virStorageLog
msg_gen_function += virStorageReportError msg_gen_function += virStorageReportError
msg_gen_function += virTestError
msg_gen_function += virXMLError msg_gen_function += virXMLError
msg_gen_function += virXenInotifyError msg_gen_function += virXenInotifyError
msg_gen_function += virXenStoreError msg_gen_function += virXenStoreError
msg_gen_function += virXendError msg_gen_function += virXendError
msg_gen_function += virxmlRpcError
msg_gen_function += vshCloseLogFile msg_gen_function += vshCloseLogFile
msg_gen_function += xenUnifiedError
msg_gen_function += xenXMError msg_gen_function += xenXMError
# Uncomment the following and run "make syntax-check" to see diagnostics # Uncomment the following and run "make syntax-check" to see diagnostics

View File

@ -32,10 +32,6 @@
/* #define DEBUG_GROW */ /* #define DEBUG_GROW */
#define virHashError(conn, code, fmt...) \
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
__FUNCTION__, __LINE__, fmt)
/* /*
* A single entry in the hash table * A single entry in the hash table
*/ */
@ -593,4 +589,3 @@ void *virHashSearch(virHashTablePtr table, virHashSearcher iter, const void *dat
} }
return (NULL); return (NULL);
} }

View File

@ -34,14 +34,6 @@
enum { OPENVZ_WARN, OPENVZ_ERR }; enum { OPENVZ_WARN, OPENVZ_ERR };
#define openvzLog(level, msg...) { if(level == OPENVZ_WARN) \
fprintf(stderr, "\nWARNING: ");\
else \
fprintf(stderr, "\nERROR: ");\
fprintf(stderr, "\n\t");\
fprintf(stderr, msg);\
fprintf(stderr, "\n"); }
#define openvzError(conn, code, fmt...) \ #define openvzError(conn, code, fmt...) \
virReportErrorHelper(conn, VIR_FROM_OPENVZ, code, __FILE__, \ virReportErrorHelper(conn, VIR_FROM_OPENVZ, code, __FILE__, \
__FUNCTION__, __LINE__, fmt) __FUNCTION__, __LINE__, fmt)

View File

@ -1,7 +1,7 @@
/* /*
* xen_unified.c: Unified Xen driver. * xen_unified.c: Unified Xen driver.
* *
* Copyright (C) 2007, 2008 Red Hat, Inc. * Copyright (C) 2007, 2008, 2009 Red Hat, Inc.
* *
* See COPYING.LIB for the License of this software * See COPYING.LIB for the License of this software
* *
@ -261,7 +261,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
/* Allocate per-connection private data. */ /* Allocate per-connection private data. */
if (VIR_ALLOC(priv) < 0) { if (VIR_ALLOC(priv) < 0) {
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, "allocating private data"); xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating private data"));
return VIR_DRV_OPEN_ERROR; return VIR_DRV_OPEN_ERROR;
} }
if (virMutexInit(&priv->lock) < 0) { if (virMutexInit(&priv->lock) < 0) {
@ -273,7 +273,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
/* Allocate callback list */ /* Allocate callback list */
if (VIR_ALLOC(cbList) < 0) { if (VIR_ALLOC(cbList) < 0) {
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, "allocating callback list"); xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating callback list"));
virMutexDestroy(&priv->lock); virMutexDestroy(&priv->lock);
VIR_FREE(priv); VIR_FREE(priv);
return VIR_DRV_OPEN_ERROR; return VIR_DRV_OPEN_ERROR;
@ -1564,7 +1564,7 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
list->count++; list->count++;
return 0; return 0;
memory_error: memory_error:
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, "allocating domain info"); xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating domain info"));
if (info) if (info)
VIR_FREE(info->name); VIR_FREE(info->name);
VIR_FREE(info); VIR_FREE(info);