[libvirt] [PATCH] Fix compilation for configure --disable-nls

Matthias Bolte matthias.bolte at googlemail.com
Sun Dec 6 22:00:43 UTC 2009


---
 src/opennebula/one_conf.c   |    2 +-
 src/opennebula/one_driver.c |   16 ++++++++--------
 src/phyp/phyp_driver.c      |   22 +++++++++++-----------
 src/xen/xen_driver.c        |    6 +++---
 4 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/opennebula/one_conf.c b/src/opennebula/one_conf.c
index 415f832..baef217 100644
--- a/src/opennebula/one_conf.c
+++ b/src/opennebula/one_conf.c
@@ -147,7 +147,7 @@ int oneSubmitVM(virConnectPtr    conn,
 
     if ((oneid = c_oneAllocateTemplate(templ)) < 0) {
         oneError(conn, NULL, VIR_ERR_OPERATION_FAILED,
-                 _("Error submitting virtual machine to OpenNebula"));
+                 "%s", _("Error submitting virtual machine to OpenNebula"));
         VIR_FREE(templ);
         return -1;
     }
diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c
index 4857f54..a30c110 100644
--- a/src/opennebula/one_driver.c
+++ b/src/opennebula/one_driver.c
@@ -280,13 +280,13 @@ static int oneDomainUndefine(virDomainPtr dom)
     vm =virDomainFindByUUID(&driver->domains, dom->uuid);
     if (!vm) {
         oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
-                 _("no domain with matching uuid"));
+                 "%s", _("no domain with matching uuid"));
         goto return_point;
     }
 
     if (!vm->persistent) {
         oneError(dom->conn, dom, VIR_ERR_INTERNAL_ERROR,
-                 _("cannot undefine transient domain"));
+                 "%s", _("cannot undefine transient domain"));
         goto return_point;
     }
     virDomainRemoveInactive(&driver->domains, vm);
@@ -499,7 +499,7 @@ static int oneDomainShutdown(virDomainPtr dom)
 
     if (c_oneShutdown(vm->pid)) {
         oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
-                 _("Wrong state to perform action"));
+                 "%s", _("Wrong state to perform action"));
         goto return_point;
     }
     vm->state=VIR_DOMAIN_SHUTDOWN;
@@ -535,7 +535,7 @@ static int oneDomainDestroy(virDomainPtr dom)
         /* VM not running, delete the instance at ONE DB */
         if(c_oneFinalize(vm->pid)){
             oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
-                     _("Wrong state to perform action"));
+                     "%s", _("Wrong state to perform action"));
             goto return_point;
         }
     }
@@ -570,11 +570,11 @@ static int oneDomainSuspend(virDomainPtr dom)
                 goto return_point;
             }
             oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
-                     _("Wrong state to perform action"));
+                     "%s", _("Wrong state to perform action"));
             goto return_point;
         }
         oneError(dom->conn,dom, VIR_ERR_OPERATION_INVALID,
-                 _("domain is not running"));
+                 "%s", _("domain is not running"));
     } else {
         oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
                  _("no domain with matching id %d"), dom->id);
@@ -603,11 +603,11 @@ static int oneDomainResume(virDomainPtr dom)
                 goto return_point;
             }
             oneError(dom->conn, dom, VIR_ERR_OPERATION_INVALID,
-                     _("Wrong state to perform action"));
+                     "%s", _("Wrong state to perform action"));
             goto return_point;
         }
         oneError(dom->conn,dom, VIR_ERR_OPERATION_INVALID,
-                 _("domain is not paused "));
+                 "%s", _("domain is not paused"));
     } else {
         oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
                  _("no domain with matching id %d"), dom->id);
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index ea9555a..dfbc968 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -91,19 +91,19 @@ phypOpen(virConnectPtr conn,
 
     if (conn->uri->server == NULL) {
         PHYP_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                   _("Missing server name in phyp:// URI"));
+                   "%s", _("Missing server name in phyp:// URI"));
         return VIR_DRV_OPEN_ERROR;
     }
 
     if (conn->uri->path == NULL) {
         PHYP_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                   _("Missing managed system name in phyp:// URI"));
+                   "%s", _("Missing managed system name in phyp:// URI"));
         return VIR_DRV_OPEN_ERROR;
     }
 
     if (conn->uri->user == NULL) {
         PHYP_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                   _("Missing username in phyp:// URI"));
+                   "%s", _("Missing username in phyp:// URI"));
         return VIR_DRV_OPEN_ERROR;
     }
 
@@ -150,13 +150,13 @@ phypOpen(virConnectPtr conn,
 
     if (escape_specialcharacters(conn->uri->path, string, len) == -1) {
         PHYP_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                   _("Error parsing 'path'. Invalid characters."));
+                   "%s", _("Error parsing 'path'. Invalid characters."));
         goto failure;
     }
 
     if ((session = openSSHSession(conn, auth, &internal_socket)) == NULL) {
         PHYP_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                   _("Error while opening SSH session."));
+                   "%s", _("Error while opening SSH session."));
         goto failure;
     }
     //conn->uri->path = string;
@@ -314,7 +314,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
            LIBSSH2_ERROR_EAGAIN) ;
     if (rc) {
         PHYP_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
-                   _("Failure establishing SSH session."));
+                   "%s", _("Failure establishing SSH session."));
         goto disconnect;
     }
 
@@ -344,7 +344,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
 
         if (!auth || !auth->cb) {
             PHYP_ERROR(conn, VIR_ERR_AUTH_FAILED,
-                       _("No authentication callback provided."));
+                       "%s", _("No authentication callback provided."));
             goto disconnect;
         }
 
@@ -355,7 +355,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
 
         if (!hasPassphrase) {
             PHYP_ERROR(conn, VIR_ERR_AUTH_FAILED,
-                       _("Required credentials are not supported."));
+                       "%s", _("Required credentials are not supported."));
             goto disconnect;
         }
 
@@ -364,7 +364,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
 
         if (res < 0) {
             PHYP_ERROR(conn, VIR_ERR_AUTH_FAILED,
-                       _("Unable to fetch credentials."));
+                       "%s", _("Unable to fetch credentials."));
             goto disconnect;
         }
 
@@ -372,7 +372,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
             password = creds[0].result;
         } else {
             PHYP_ERROR(conn, VIR_ERR_AUTH_FAILED,
-                       _("Unable to get password certificates"));
+                       "%s", _("Unable to get password certificates"));
             goto disconnect;
         }
 
@@ -383,7 +383,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
 
         if (rc) {
             PHYP_ERROR(conn, VIR_ERR_AUTH_FAILED,
-                       _("Authentication failed"));
+                       "%s", _("Authentication failed"));
             goto disconnect;
         } else
             goto exit;
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 4bfcce4..ed94bed 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -1316,14 +1316,14 @@ xenUnifiedDomainMigrateFinish (virConnectPtr dconn,
         domain_xml = xenDaemonDomainDumpXML (dom, 0, NULL);
         if (! domain_xml) {
             xenUnifiedError(dconn, VIR_ERR_MIGRATE_PERSIST_FAILED,
-                            _("failed to get XML representation of migrated domain"));
+                            "%s", _("failed to get XML representation of migrated domain"));
             goto failure;
         }
 
         dom_new = xenDaemonDomainDefineXML (dconn, domain_xml);
         if (! dom_new) {
-            xenUnifiedError (dconn, VIR_ERR_MIGRATE_PERSIST_FAILED,
-                             _("failed to define domain on destination host"));
+            xenUnifiedError(dconn, VIR_ERR_MIGRATE_PERSIST_FAILED,
+                            "%s", _("failed to define domain on destination host"));
             goto failure;
         }
 
-- 
1.6.0.4




More information about the libvir-list mailing list