[PATCH] Update and sort msg_gen_function list and mark unmarked messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Inspired by Eric Blake
---
 cfg.mk                       |   45 ++++++++++++++++++++++++++++++++++-------
 src/interface/netcf_driver.c |   43 ++++++++++++++++++---------------------
 src/nodeinfo.c               |    2 +-
 src/phyp/phyp_driver.c       |   18 ++++++++--------
 src/util/stats_linux.c       |    2 +-
 5 files changed, 68 insertions(+), 42 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index e54d170..72dd69c 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -380,47 +380,76 @@ sc_prohibit_xmlGetProp:
 msg_gen_function =
 msg_gen_function += ESX_ERROR
 msg_gen_function += ESX_VI_ERROR
-msg_gen_function += macvtapError
-msg_gen_function += remoteError
+msg_gen_function += PHYP_ERROR
+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 += networkLog
+msg_gen_function += libxlError
+msg_gen_function += macvtapError
 msg_gen_function += networkReportError
-msg_gen_function += oneError
+msg_gen_function += nodeReportError
 msg_gen_function += openvzError
+msg_gen_function += pciReportError
 msg_gen_function += qemuReportError
 msg_gen_function += qemudDispatchClientFailure
 msg_gen_function += regerror
+msg_gen_function += remoteError
 msg_gen_function += remoteDispatchFormatError
+msg_gen_function += statsError
+msg_gen_function += streamsReportError
+msg_gen_function += usbReportError
 msg_gen_function += umlReportError
 msg_gen_function += vah_error
 msg_gen_function += vah_warning
 msg_gen_function += vboxError
 msg_gen_function += virCommandError
 msg_gen_function += virConfError
+msg_gen_function += virCPUReportError
+msg_gen_function += virEventError
 msg_gen_function += virDomainReportError
+msg_gen_function += virGenericReportError
 msg_gen_function += virHashError
+msg_gen_function += virHookReportError
+msg_gen_function += virInterfaceReportError
+msg_gen_function += virJSONError
 msg_gen_function += virLibConnError
 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 += virNodeDeviceReportError
+msg_gen_function += virNWFilterReportError
 msg_gen_function += virRaiseError
 msg_gen_function += virReportErrorHelper
 msg_gen_function += virReportSystemError
+msg_gen_function += virSecretReportError
 msg_gen_function += virSecurityReportError
 msg_gen_function += virSexprError
+msg_gen_function += virSmbiosReportError
+msg_gen_function += virSocketError
+msg_gen_function += virStatsError
 msg_gen_function += virStorageReportError
+msg_gen_function += virUtilError
 msg_gen_function += virXMLError
 msg_gen_function += virXenInotifyError
 msg_gen_function += virXenStoreError
 msg_gen_function += virXendError
 msg_gen_function += vmwareError
 msg_gen_function += xenapiSessionErrorHandler
-msg_gen_function += libxlError
 msg_gen_function += xenUnifiedError
 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
 # that are not yet marked for translation, but that need to be rewritten
diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c
index 0190bf4..709f09b 100644
--- a/src/interface/netcf_driver.c
+++ b/src/interface/netcf_driver.c
@@ -102,11 +102,12 @@ static struct netcf_if *interfaceDriverGetNetcfIF(struct netcf *ncf, virInterfac
         int errcode = ncf_error(ncf, &errmsg, &details);
         if (errcode != NETCF_NOERROR) {
             interfaceReportError(netcf_to_vir_err(errcode),
-                                 "couldn't find interface named '%s' (netcf: %s - %s)",
-                                ifinfo->name, errmsg, details ? details : "");
+                                 _("couldn't find interface named '%s' (netcf: %s - %s)"),
+                                 ifinfo->name, errmsg, details ? details : "");
         } else {
             interfaceReportError(VIR_ERR_NO_INTERFACE,
-                                 "couldn't find interface named '%s'", ifinfo->name);
+                                 _("couldn't find interface named '%s'"),
+                                 ifinfo->name);
         }
     }
     return iface;
@@ -182,8 +183,7 @@ static int interfaceNumOfInterfaces(virConnectPtr conn)
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         interfaceReportError(netcf_to_vir_err(errcode),
-                             "%s (netcf: %s - %s)",
-                             _("failed to get number of interfaces on host"),
+                             _("failed to get number of interfaces on host (netcf: %s - %s)"),
                             errmsg, details ? details : "");
     }
 
@@ -203,8 +203,7 @@ static int interfaceListInterfaces(virConnectPtr conn, char **const names, int n
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         interfaceReportError(netcf_to_vir_err(errcode),
-                             "%s (netcf: %s - %s)",
-                             _("failed to list host interfaces"),
+                             _("failed to list host interfaces (netcf: %s - %s)"),
                             errmsg, details ? details : "");
     }
 
@@ -224,8 +223,7 @@ static int interfaceNumOfDefinedInterfaces(virConnectPtr conn)
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         interfaceReportError(netcf_to_vir_err(errcode),
-                             "%s (netcf: %s - %s)",
-                             _("failed to get number of defined interfaces on host"),
+                             _("failed to get number of defined interfaces on host (netcf: %s - %s)"),
                             errmsg, details ? details : "");
     }
 
@@ -245,8 +243,7 @@ static int interfaceListDefinedInterfaces(virConnectPtr conn, char **const names
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         interfaceReportError(netcf_to_vir_err(errcode),
-                             "%s (netcf: %s - %s)",
-                             _("failed to list host defined interfaces"),
+                             _("failed to list host defined interfaces (netcf: %s - %s)"),
                             errmsg, details ? details : "");
     }
 
@@ -269,11 +266,11 @@ static virInterfacePtr interfaceLookupByName(virConnectPtr conn,
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         if (errcode != NETCF_NOERROR) {
             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 : "");
         } else {
             interfaceReportError(VIR_ERR_NO_INTERFACE,
-                                 "couldn't find interface named '%s'", name);
+                                 _("couldn't find interface named '%s'"), name);
         }
         goto cleanup;
     }
@@ -301,13 +298,13 @@ static virInterfacePtr interfaceLookupByMACString(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         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 : "");
         goto cleanup;
     }
     if (niface == 0) {
         interfaceReportError(VIR_ERR_NO_INTERFACE,
-                             "couldn't find interface with MAC address '%s'",
+                             _("couldn't find interface with MAC address '%s'"),
                              macstr);
         goto cleanup;
     }
@@ -351,8 +348,8 @@ static char *interfaceGetXMLDesc(virInterfacePtr ifinfo,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         interfaceReportError(netcf_to_vir_err(errcode),
-                             "could not get interface XML description (netcf: %s - %s)",
-                            errmsg, details ? details : "");
+                             _("could not get interface XML description (netcf: %s - %s)"),
+                             errmsg, details ? details : "");
         goto cleanup;
     }
 
@@ -405,8 +402,8 @@ static virInterfacePtr interfaceDefineXML(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         interfaceReportError(netcf_to_vir_err(errcode),
-                             "could not get interface XML description (netcf: %s - %s)",
-                            errmsg, details ? details : "");
+                             _("could not get interface XML description (netcf: %s - %s)"),
+                             errmsg, details ? details : "");
         goto cleanup;
     }
 
@@ -438,7 +435,7 @@ static int interfaceUndefine(virInterfacePtr ifinfo) {
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         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 : "");
         goto cleanup;
     }
@@ -469,7 +466,7 @@ static int interfaceCreate(virInterfacePtr ifinfo,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         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 : "");
         goto cleanup;
     }
@@ -500,7 +497,7 @@ static int interfaceDestroy(virInterfacePtr ifinfo,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         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 : "");
         goto cleanup;
     }
@@ -530,7 +527,7 @@ static int interfaceIsActive(virInterfacePtr ifinfo)
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         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 : "");
         goto cleanup;
     }
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index facac15..e0221f0 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -239,7 +239,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
                 buf++;
             if (*buf != ':' || !buf[1]) {
                 nodeReportError(VIR_ERR_INTERNAL_ERROR,
-                                "parsing cpuinfo cpu cores %c", *buf);
+                                _("parsing cpuinfo cpu cores %c"), *buf);
                 return -1;
             }
             if (virStrToLong_ui(buf+1, &p, 10, &id) == 0
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 8f8c3ba..c65824a 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3659,28 +3659,28 @@ phypBuildLpar(virConnectPtr conn, virDomainDefPtr def)
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
     if (!def->mem.cur_balloon) {
-        PHYP_ERROR(VIR_ERR_XML_ERROR,"%s",
-                _("Field \"<memory>\" on the domain XML file is missing or has "
-                    "invalid value."));
+        PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
+                _("Field <memory> on the domain XML file is missing or has "
+                  "invalid value."));
         goto cleanup;
     }
 
     if (!def->mem.max_balloon) {
-        PHYP_ERROR(VIR_ERR_XML_ERROR,"%s",
-                _("Field \"<currentMemory>\" on the domain XML file is missing or"
-                    " has invalid value."));
+        PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
+                _("Field <currentMemory> on the domain XML file is missing or "
+                  "has invalid value."));
         goto cleanup;
     }
 
     if (def->ndisks < 1) {
         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;
     }
 
     if (!def->disks[0]->src) {
-        PHYP_ERROR(VIR_ERR_XML_ERROR,"%s",
-                   _("Field \"<src>\" under \"<disk>\" on the domain XML file is "
+        PHYP_ERROR(VIR_ERR_XML_ERROR, "%s",
+                   _("Field <src> under <disk> on the domain XML file is "
                      "missing."));
         goto cleanup;
     }
diff --git a/src/util/stats_linux.c b/src/util/stats_linux.c
index 173cdc5..e728b7b 100644
--- a/src/util/stats_linux.c
+++ b/src/util/stats_linux.c
@@ -107,7 +107,7 @@ linuxDomainInterfaceStats(const char *path,
     VIR_FORCE_FCLOSE(fp);
 
     virStatsError(VIR_ERR_INTERNAL_ERROR,
-                  "/proc/net/dev: Interface not found");
+                  _("/proc/net/dev: Interface not found"));
     return -1;
 }
 
-- 
1.7.0.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]