提交 6278bb19 编写于 作者: J Jim Meyering

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.
上级 e80f1006
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>
* src/domain_conf.c, src/domain_conf.h, src/xend_internal.c,
......
......@@ -390,6 +390,7 @@ msg_gen_function += ERROR0
msg_gen_function += REMOTE_DEBUG
msg_gen_function += ReportError
msg_gen_function += VIR_FREE
msg_gen_function += VIR_INFO
msg_gen_function += VIR_USE_CPU
msg_gen_function += errorf
msg_gen_function += lxcError
......@@ -401,9 +402,7 @@ msg_gen_function += qemudDispatchClientFailure
msg_gen_function += qemudLog
msg_gen_function += qemudReportError
msg_gen_function += regerror
msg_gen_function += remoteDispatchError
msg_gen_function += remoteDispatchFormatError
msg_gen_function += umlError
msg_gen_function += umlLog
msg_gen_function += umlReportError
msg_gen_function += virConfError
......@@ -414,18 +413,19 @@ msg_gen_function += virLibDomainError
msg_gen_function += virLog
msg_gen_function += virNetworkReportError
msg_gen_function += virNodeDeviceReportError
msg_gen_function += virProxyError
msg_gen_function += virRaiseError
msg_gen_function += virReportErrorHelper
msg_gen_function += virReportSystemError
msg_gen_function += virSexprError
msg_gen_function += virStorageLog
msg_gen_function += virStorageReportError
msg_gen_function += virTestError
msg_gen_function += virXMLError
msg_gen_function += virXenInotifyError
msg_gen_function += virXenStoreError
msg_gen_function += virXendError
msg_gen_function += virxmlRpcError
msg_gen_function += vshCloseLogFile
msg_gen_function += xenUnifiedError
msg_gen_function += xenXMError
# Uncomment the following and run "make syntax-check" to see diagnostics
......
......@@ -32,10 +32,6 @@
/* #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
*/
......@@ -593,4 +589,3 @@ void *virHashSearch(virHashTablePtr table, virHashSearcher iter, const void *dat
}
return (NULL);
}
......@@ -34,14 +34,6 @@
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...) \
virReportErrorHelper(conn, VIR_FROM_OPENVZ, code, __FILE__, \
__FUNCTION__, __LINE__, fmt)
......
/*
* 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
*
......@@ -261,7 +261,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
/* Allocate per-connection private data. */
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;
}
if (virMutexInit(&priv->lock) < 0) {
......@@ -273,7 +273,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
/* Allocate callback list */
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);
VIR_FREE(priv);
return VIR_DRV_OPEN_ERROR;
......@@ -1564,7 +1564,7 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
list->count++;
return 0;
memory_error:
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, "allocating domain info");
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating domain info"));
if (info)
VIR_FREE(info->name);
VIR_FREE(info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册