Update and sort msg_gen_function list and mark unmarked messages

Inspired by Eric Blake
This commit is contained in:
Matthias Bolte 2011-04-17 08:30:49 +02:00
parent a35af32c1e
commit 78ef49eae3
5 changed files with 68 additions and 42 deletions

45
cfg.mk
View File

@ -380,47 +380,76 @@ sc_prohibit_xmlGetProp:
msg_gen_function = msg_gen_function =
msg_gen_function += ESX_ERROR msg_gen_function += ESX_ERROR
msg_gen_function += ESX_VI_ERROR msg_gen_function += ESX_VI_ERROR
msg_gen_function += macvtapError msg_gen_function += PHYP_ERROR
msg_gen_function += remoteError msg_gen_function += VIR_ERROR
msg_gen_function += VIR_ERROR0
msg_gen_function += VMX_ERROR
msg_gen_function += XENXS_ERROR
msg_gen_function += eventReportError
msg_gen_function += ifaceError
msg_gen_function += interfaceReportError
msg_gen_function += iptablesError
msg_gen_function += lxcError msg_gen_function += lxcError
msg_gen_function += networkLog msg_gen_function += libxlError
msg_gen_function += macvtapError
msg_gen_function += networkReportError msg_gen_function += networkReportError
msg_gen_function += oneError msg_gen_function += nodeReportError
msg_gen_function += openvzError msg_gen_function += openvzError
msg_gen_function += pciReportError
msg_gen_function += qemuReportError msg_gen_function += qemuReportError
msg_gen_function += qemudDispatchClientFailure msg_gen_function += qemudDispatchClientFailure
msg_gen_function += regerror msg_gen_function += regerror
msg_gen_function += remoteError
msg_gen_function += remoteDispatchFormatError msg_gen_function += remoteDispatchFormatError
msg_gen_function += statsError
msg_gen_function += streamsReportError
msg_gen_function += usbReportError
msg_gen_function += umlReportError msg_gen_function += umlReportError
msg_gen_function += vah_error msg_gen_function += vah_error
msg_gen_function += vah_warning msg_gen_function += vah_warning
msg_gen_function += vboxError msg_gen_function += vboxError
msg_gen_function += virCommandError msg_gen_function += virCommandError
msg_gen_function += virConfError msg_gen_function += virConfError
msg_gen_function += virCPUReportError
msg_gen_function += virEventError
msg_gen_function += virDomainReportError msg_gen_function += virDomainReportError
msg_gen_function += virGenericReportError
msg_gen_function += virHashError msg_gen_function += virHashError
msg_gen_function += virHookReportError
msg_gen_function += virInterfaceReportError
msg_gen_function += virJSONError
msg_gen_function += virLibConnError msg_gen_function += virLibConnError
msg_gen_function += virLibDomainError msg_gen_function += virLibDomainError
msg_gen_function += virLibDomainSnapshotError
msg_gen_function += virLibInterfaceError
msg_gen_function += virLibNetworkError
msg_gen_function += virLibNodeDeviceError
msg_gen_function += virLibNWFilterError
msg_gen_function += virLibSecretError
msg_gen_function += virLibStoragePoolError
msg_gen_function += virLibStorageVolError
msg_gen_function += virNetworkReportError msg_gen_function += virNetworkReportError
msg_gen_function += virNodeDeviceReportError msg_gen_function += virNodeDeviceReportError
msg_gen_function += virNWFilterReportError
msg_gen_function += virRaiseError msg_gen_function += virRaiseError
msg_gen_function += virReportErrorHelper msg_gen_function += virReportErrorHelper
msg_gen_function += virReportSystemError msg_gen_function += virReportSystemError
msg_gen_function += virSecretReportError
msg_gen_function += virSecurityReportError msg_gen_function += virSecurityReportError
msg_gen_function += virSexprError msg_gen_function += virSexprError
msg_gen_function += virSmbiosReportError
msg_gen_function += virSocketError
msg_gen_function += virStatsError
msg_gen_function += virStorageReportError msg_gen_function += virStorageReportError
msg_gen_function += virUtilError
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 += vmwareError msg_gen_function += vmwareError
msg_gen_function += xenapiSessionErrorHandler msg_gen_function += xenapiSessionErrorHandler
msg_gen_function += libxlError
msg_gen_function += xenUnifiedError msg_gen_function += xenUnifiedError
msg_gen_function += xenXMError msg_gen_function += xenXMError
msg_gen_function += VIR_ERROR
msg_gen_function += VIR_ERROR0
msg_gen_function += statsError
# Uncomment the following and run "make syntax-check" to see diagnostics # Uncomment the following and run "make syntax-check" to see diagnostics
# that are not yet marked for translation, but that need to be rewritten # that are not yet marked for translation, but that need to be rewritten

View File

@ -102,11 +102,12 @@ static struct netcf_if *interfaceDriverGetNetcfIF(struct netcf *ncf, virInterfac
int errcode = ncf_error(ncf, &errmsg, &details); int errcode = ncf_error(ncf, &errmsg, &details);
if (errcode != NETCF_NOERROR) { if (errcode != NETCF_NOERROR) {
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"couldn't find interface named '%s' (netcf: %s - %s)", _("couldn't find interface named '%s' (netcf: %s - %s)"),
ifinfo->name, errmsg, details ? details : ""); ifinfo->name, errmsg, details ? details : "");
} else { } else {
interfaceReportError(VIR_ERR_NO_INTERFACE, interfaceReportError(VIR_ERR_NO_INTERFACE,
"couldn't find interface named '%s'", ifinfo->name); _("couldn't find interface named '%s'"),
ifinfo->name);
} }
} }
return iface; return iface;
@ -182,8 +183,7 @@ static int interfaceNumOfInterfaces(virConnectPtr conn)
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"%s (netcf: %s - %s)", _("failed to get number of interfaces on host (netcf: %s - %s)"),
_("failed to get number of interfaces on host"),
errmsg, details ? details : ""); errmsg, details ? details : "");
} }
@ -203,8 +203,7 @@ static int interfaceListInterfaces(virConnectPtr conn, char **const names, int n
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"%s (netcf: %s - %s)", _("failed to list host interfaces (netcf: %s - %s)"),
_("failed to list host interfaces"),
errmsg, details ? details : ""); errmsg, details ? details : "");
} }
@ -224,8 +223,7 @@ static int interfaceNumOfDefinedInterfaces(virConnectPtr conn)
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"%s (netcf: %s - %s)", _("failed to get number of defined interfaces on host (netcf: %s - %s)"),
_("failed to get number of defined interfaces on host"),
errmsg, details ? details : ""); errmsg, details ? details : "");
} }
@ -245,8 +243,7 @@ static int interfaceListDefinedInterfaces(virConnectPtr conn, char **const names
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"%s (netcf: %s - %s)", _("failed to list host defined interfaces (netcf: %s - %s)"),
_("failed to list host defined interfaces"),
errmsg, details ? details : ""); errmsg, details ? details : "");
} }
@ -269,11 +266,11 @@ static virInterfacePtr interfaceLookupByName(virConnectPtr conn,
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
if (errcode != NETCF_NOERROR) { if (errcode != NETCF_NOERROR) {
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"couldn't find interface named '%s' (netcf: %s - %s)", _("couldn't find interface named '%s' (netcf: %s - %s)"),
name, errmsg, details ? details : ""); name, errmsg, details ? details : "");
} else { } else {
interfaceReportError(VIR_ERR_NO_INTERFACE, interfaceReportError(VIR_ERR_NO_INTERFACE,
"couldn't find interface named '%s'", name); _("couldn't find interface named '%s'"), name);
} }
goto cleanup; goto cleanup;
} }
@ -301,13 +298,13 @@ static virInterfacePtr interfaceLookupByMACString(virConnectPtr conn,
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"couldn't find interface with MAC address '%s' (netcf: %s - %s)", _("couldn't find interface with MAC address '%s' (netcf: %s - %s)"),
macstr, errmsg, details ? details : ""); macstr, errmsg, details ? details : "");
goto cleanup; goto cleanup;
} }
if (niface == 0) { if (niface == 0) {
interfaceReportError(VIR_ERR_NO_INTERFACE, interfaceReportError(VIR_ERR_NO_INTERFACE,
"couldn't find interface with MAC address '%s'", _("couldn't find interface with MAC address '%s'"),
macstr); macstr);
goto cleanup; goto cleanup;
} }
@ -351,8 +348,8 @@ static char *interfaceGetXMLDesc(virInterfacePtr ifinfo,
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"could not get interface XML description (netcf: %s - %s)", _("could not get interface XML description (netcf: %s - %s)"),
errmsg, details ? details : ""); errmsg, details ? details : "");
goto cleanup; goto cleanup;
} }
@ -405,8 +402,8 @@ static virInterfacePtr interfaceDefineXML(virConnectPtr conn,
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"could not get interface XML description (netcf: %s - %s)", _("could not get interface XML description (netcf: %s - %s)"),
errmsg, details ? details : ""); errmsg, details ? details : "");
goto cleanup; goto cleanup;
} }
@ -438,7 +435,7 @@ static int interfaceUndefine(virInterfacePtr ifinfo) {
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"failed to undefine interface %s (netcf: %s - %s)", _("failed to undefine interface %s (netcf: %s - %s)"),
ifinfo->name, errmsg, details ? details : ""); ifinfo->name, errmsg, details ? details : "");
goto cleanup; goto cleanup;
} }
@ -469,7 +466,7 @@ static int interfaceCreate(virInterfacePtr ifinfo,
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"failed to create (start) interface %s (netcf: %s - %s)", _("failed to create (start) interface %s (netcf: %s - %s)"),
ifinfo->name, errmsg, details ? details : ""); ifinfo->name, errmsg, details ? details : "");
goto cleanup; goto cleanup;
} }
@ -500,7 +497,7 @@ static int interfaceDestroy(virInterfacePtr ifinfo,
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"failed to destroy (stop) interface %s (netcf: %s - %s)", _("failed to destroy (stop) interface %s (netcf: %s - %s)"),
ifinfo->name, errmsg, details ? details : ""); ifinfo->name, errmsg, details ? details : "");
goto cleanup; goto cleanup;
} }
@ -530,7 +527,7 @@ static int interfaceIsActive(virInterfacePtr ifinfo)
const char *errmsg, *details; const char *errmsg, *details;
int errcode = ncf_error(driver->netcf, &errmsg, &details); int errcode = ncf_error(driver->netcf, &errmsg, &details);
interfaceReportError(netcf_to_vir_err(errcode), interfaceReportError(netcf_to_vir_err(errcode),
"failed to get status of interface %s (netcf: %s - %s)", _("failed to get status of interface %s (netcf: %s - %s)"),
ifinfo->name, errmsg, details ? details : ""); ifinfo->name, errmsg, details ? details : "");
goto cleanup; goto cleanup;
} }

View File

@ -239,7 +239,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
buf++; buf++;
if (*buf != ':' || !buf[1]) { if (*buf != ':' || !buf[1]) {
nodeReportError(VIR_ERR_INTERNAL_ERROR, nodeReportError(VIR_ERR_INTERNAL_ERROR,
"parsing cpuinfo cpu cores %c", *buf); _("parsing cpuinfo cpu cores %c"), *buf);
return -1; return -1;
} }
if (virStrToLong_ui(buf+1, &p, 10, &id) == 0 if (virStrToLong_ui(buf+1, &p, 10, &id) == 0

View File

@ -3485,28 +3485,28 @@ phypBuildLpar(virConnectPtr conn, virDomainDefPtr def)
virBuffer buf = VIR_BUFFER_INITIALIZER; virBuffer buf = VIR_BUFFER_INITIALIZER;
if (!def->mem.cur_balloon) { if (!def->mem.cur_balloon) {
PHYP_ERROR(VIR_ERR_XML_ERROR,"%s", PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
_("Field \"<memory>\" on the domain XML file is missing or has " _("Field <memory> on the domain XML file is missing or has "
"invalid value.")); "invalid value."));
goto cleanup; goto cleanup;
} }
if (!def->mem.max_balloon) { if (!def->mem.max_balloon) {
PHYP_ERROR(VIR_ERR_XML_ERROR,"%s", PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
_("Field \"<currentMemory>\" on the domain XML file is missing or" _("Field <currentMemory> on the domain XML file is missing or "
" has invalid value.")); "has invalid value."));
goto cleanup; goto cleanup;
} }
if (def->ndisks < 1) { if (def->ndisks < 1) {
PHYP_ERROR(VIR_ERR_XML_ERROR, "%s", PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
_("Domain XML must contain at least one \"<disk>\" element.")); _("Domain XML must contain at least one <disk> element."));
goto cleanup; goto cleanup;
} }
if (!def->disks[0]->src) { if (!def->disks[0]->src) {
PHYP_ERROR(VIR_ERR_XML_ERROR,"%s", PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
_("Field \"<src>\" under \"<disk>\" on the domain XML file is " _("Field <src> under <disk> on the domain XML file is "
"missing.")); "missing."));
goto cleanup; goto cleanup;
} }

View File

@ -107,7 +107,7 @@ linuxDomainInterfaceStats(const char *path,
VIR_FORCE_FCLOSE(fp); VIR_FORCE_FCLOSE(fp);
virStatsError(VIR_ERR_INTERNAL_ERROR, virStatsError(VIR_ERR_INTERNAL_ERROR,
"/proc/net/dev: Interface not found"); _("/proc/net/dev: Interface not found"));
return -1; return -1;
} }