]> xenbits.xensource.com Git - libvirt.git/commitdiff
ReportError: mark for translation string args to this function
authorJim Meyering <meyering@redhat.com>
Thu, 27 Mar 2008 13:47:00 +0000 (13:47 +0000)
committerJim Meyering <meyering@redhat.com>
Thu, 27 Mar 2008 13:47:00 +0000 (13:47 +0000)
* Makefile.maint (msg_gen_function): Add ReportError.
* src/util.c (_virExec): Mark strings.

ChangeLog
Makefile.maint
src/util.c

index e94085e0351bf6e073365798c5519acc64779178..6cbb171cbc280396e03466cab7469f9b28381b8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Thu Mar 27 14:36:56 CET 2008 Jim Meyering <meyering@redhat.com>
 
+       ReportError: mark for translation string args to this function
+       * Makefile.maint (msg_gen_function): Add ReportError.
+       * src/util.c (_virExec): Mark strings.
+
        xenXMError: mark for translation string args to this function
        * Makefile.maint (msg_gen_function): Add xenXMError.
        * src/xm_internal.c (xenXMParseXMLToConfig, xenXMDomainDefineXML):
index ff09660dac36a04d7130bb65cc38e42cac14fa1d..ccf6f5d6047f4ba999d7387b1578a42f700c0f6e 100644 (file)
@@ -313,9 +313,9 @@ msg_gen_function += qemudLog
 msg_gen_function += remoteDispatchError
 msg_gen_function += virStorageLog
 msg_gen_function += xenXMError
+msg_gen_function += ReportError
 
 # msg_gen_function += virXenError
-# msg_gen_function += ReportError
 # msg_gen_function += testError
 # msg_gen_function += openvzLog
 # msg_gen_function += qemudReportError
index 188b7a82f24962c66da29d3115568640d89acfdb..066778086476a031f2b4be27bcb88e846cac5551 100644 (file)
@@ -106,21 +106,22 @@ _virExec(virConnectPtr conn,
     int pipeerr[2] = {-1,-1};
 
     if ((null = open(_PATH_DEVNULL, O_RDONLY)) < 0) {
-        ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot open %s : %s",
-                         _PATH_DEVNULL, strerror(errno));
+        ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+                    _("cannot open %s: %s"),
+                    _PATH_DEVNULL, strerror(errno));
         goto cleanup;
     }
 
     if ((outfd != NULL && pipe(pipeout) < 0) ||
         (errfd != NULL && pipe(pipeerr) < 0)) {
-        ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot create pipe : %s",
-                         strerror(errno));
+        ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+                    _("cannot create pipe: %s"), strerror(errno));
         goto cleanup;
     }
 
     if ((pid = fork()) < 0) {
-        ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot fork child process : %s",
-                         strerror(errno));
+        ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+                    _("cannot fork child process: %s"), strerror(errno));
         goto cleanup;
     }
 
@@ -131,11 +132,11 @@ _virExec(virConnectPtr conn,
             if(non_block)
                 if(virSetNonBlock(pipeout[0]) == -1)
                     ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
-                            "Failed to set non-blocking file descriptor flag");
+                        _("Failed to set non-blocking file descriptor flag"));
 
             if(virSetCloseExec(pipeout[0]) == -1)
                 ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
-                        "Failed to set close-on-exec file descriptor flag");
+                        _("Failed to set close-on-exec file descriptor flag"));
             *outfd = pipeout[0];
         }
         if (errfd) {
@@ -143,11 +144,11 @@ _virExec(virConnectPtr conn,
             if(non_block)
                 if(virSetNonBlock(pipeerr[0]) == -1)
                     ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
-                            "Failed to set non-blocking file descriptor flag");
+                          _("Failed to set non-blocking file descriptor flag"));
 
             if(virSetCloseExec(pipeerr[0]) == -1)
                 ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
-                        "Failed to set close-on-exec file descriptor flag");
+                        _("Failed to set close-on-exec file descriptor flag"));
             *errfd = pipeerr[0];
         }
         *retpid = pid;