[libvirt PATCH 15/51] interface: Update format strings in translated messages

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

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/interface/interface_backend_netcf.c |  50 ++++++------
 src/interface/interface_backend_udev.c  | 100 ++++++++++++------------
 2 files changed, 76 insertions(+), 74 deletions(-)

diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c
index 7bd3e7e1e2..d4a11157cc 100644
--- a/src/interface/interface_backend_netcf.c
+++ b/src/interface/interface_backend_netcf.c
@@ -117,7 +117,7 @@ netcfStateInitialize(bool privileged,
     }
 
     if (g_mkdir_with_parents(driver->stateDir, S_IRWXU) < 0) {
-        virReportSystemError(errno, _("cannot create state directory '%s'"),
+        virReportSystemError(errno, _("cannot create state directory '%1$s'"),
                              driver->stateDir);
         goto error;
     }
@@ -299,12 +299,12 @@ static struct netcf_if *interfaceDriverGetNetcfIF(struct netcf *ncf, virInterfac
         int errcode = ncf_error(ncf, &errmsg, &details);
         if (errcode != NETCF_NOERROR) {
             virReportError(netcf_to_vir_err(errcode),
-                           _("couldn't find interface named '%s': %s%s%s"),
+                           _("couldn't find interface named '%1$s': %2$s%3$s%4$s"),
                            ifinfo->name, errmsg, details ? " - " : "",
                            NULLSTR_EMPTY(details));
         } else {
             virReportError(VIR_ERR_NO_INTERFACE,
-                           _("couldn't find interface named '%s'"),
+                           _("couldn't find interface named '%1$s'"),
                            ifinfo->name);
         }
     }
@@ -323,7 +323,7 @@ netcfInterfaceObjIsActive(struct netcf_if *iface,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to get status of interface %s: %s%s%s"),
+                       _("failed to get status of interface %1$s: %2$s%3$s%4$s"),
                        ncf_if_name(iface), errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -355,7 +355,7 @@ static int netcfConnectNumOfInterfacesImpl(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to get number of host interfaces: %s%s%s"),
+                       _("failed to get number of host interfaces: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -372,7 +372,7 @@ static int netcfConnectNumOfInterfacesImpl(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to list host interfaces: %s%s%s"),
+                       _("failed to list host interfaces: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -388,7 +388,7 @@ static int netcfConnectNumOfInterfacesImpl(virConnectPtr conn,
             int errcode = ncf_error(driver->netcf, &errmsg, &details);
             if (errcode != NETCF_NOERROR) {
                 virReportError(netcf_to_vir_err(errcode),
-                               _("couldn't find interface named '%s': %s%s%s"),
+                               _("couldn't find interface named '%1$s': %2$s%3$s%4$s"),
                                names[i], errmsg,
                                details ? " - " : "", NULLSTR_EMPTY(details));
                 goto cleanup;
@@ -441,7 +441,7 @@ static int netcfConnectListInterfacesImpl(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to get number of host interfaces: %s%s%s"),
+                       _("failed to get number of host interfaces: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -458,7 +458,7 @@ static int netcfConnectListInterfacesImpl(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to list host interfaces: %s%s%s"),
+                       _("failed to list host interfaces: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -479,7 +479,7 @@ static int netcfConnectListInterfacesImpl(virConnectPtr conn,
             int errcode = ncf_error(driver->netcf, &errmsg, &details);
             if (errcode != NETCF_NOERROR) {
                 virReportError(netcf_to_vir_err(errcode),
-                               _("couldn't find interface named '%s': %s%s%s"),
+                               _("couldn't find interface named '%1$s': %2$s%3$s%4$s"),
                                allnames[i], errmsg,
                                details ? " - " : "", NULLSTR_EMPTY(details));
                 goto cleanup;
@@ -624,7 +624,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn,
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
 
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to get number of host interfaces: %s%s%s"),
+                       _("failed to get number of host interfaces: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -643,7 +643,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn,
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
 
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to list host interfaces: %s%s%s"),
+                       _("failed to list host interfaces: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -661,7 +661,7 @@ netcfConnectListAllInterfaces(virConnectPtr conn,
             int errcode = ncf_error(driver->netcf, &errmsg, &details);
             if (errcode != NETCF_NOERROR) {
                 virReportError(netcf_to_vir_err(errcode),
-                               _("couldn't find interface named '%s': %s%s%s"),
+                               _("couldn't find interface named '%1$s': %2$s%3$s%4$s"),
                                names[i], errmsg,
                                details ? " - " : "", NULLSTR_EMPTY(details));
                 goto cleanup;
@@ -735,12 +735,12 @@ static virInterfacePtr netcfInterfaceLookupByName(virConnectPtr conn,
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         if (errcode != NETCF_NOERROR) {
             virReportError(netcf_to_vir_err(errcode),
-                           _("couldn't find interface named '%s': %s%s%s"),
+                           _("couldn't find interface named '%1$s': %2$s%3$s%4$s"),
                            name, errmsg,
                            details ? " - " : "", NULLSTR_EMPTY(details));
         } else {
             virReportError(VIR_ERR_NO_INTERFACE,
-                           _("couldn't find interface named '%s'"), name);
+                           _("couldn't find interface named '%1$s'"), name);
         }
         goto cleanup;
     }
@@ -773,14 +773,14 @@ static virInterfacePtr netcfInterfaceLookupByMACString(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("couldn't find interface with MAC address '%s': %s%s%s"),
+                       _("couldn't find interface with MAC address '%1$s': %2$s%3$s%4$s"),
                        macstr, errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
     }
     if (niface == 0) {
         virReportError(VIR_ERR_NO_INTERFACE,
-                       _("couldn't find interface with MAC address '%s'"),
+                       _("couldn't find interface with MAC address '%1$s'"),
                        macstr);
         goto cleanup;
     }
@@ -834,7 +834,7 @@ static char *netcfInterfaceGetXMLDesc(virInterfacePtr ifinfo,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("could not get interface XML description: %s%s%s"),
+                       _("could not get interface XML description: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -893,7 +893,7 @@ static virInterfacePtr netcfInterfaceDefineXML(virConnectPtr conn,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("could not get interface XML description: %s%s%s"),
+                       _("could not get interface XML description: %1$s%2$s%3$s"),
                        errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -932,7 +932,7 @@ static int netcfInterfaceUndefine(virInterfacePtr ifinfo)
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to undefine interface %s: %s%s%s"),
+                       _("failed to undefine interface %1$s: %2$s%3$s%4$s"),
                        ifinfo->name, errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -981,7 +981,7 @@ static int netcfInterfaceCreate(virInterfacePtr ifinfo,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to create (start) interface %s: %s%s%s"),
+                       _("failed to create (start) interface %1$s: %2$s%3$s%4$s"),
                        ifinfo->name, errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -1030,7 +1030,7 @@ static int netcfInterfaceDestroy(virInterfacePtr ifinfo,
         const char *errmsg, *details;
         int errcode = ncf_error(driver->netcf, &errmsg, &details);
         virReportError(netcf_to_vir_err(errcode),
-                       _("failed to destroy (stop) interface %s: %s%s%s"),
+                       _("failed to destroy (stop) interface %1$s: %2$s%3$s%4$s"),
                        ifinfo->name, errmsg, details ? " - " : "",
                        NULLSTR_EMPTY(details));
         goto cleanup;
@@ -1086,7 +1086,7 @@ static int netcfInterfaceChangeBegin(virConnectPtr conn, unsigned int flags)
             const char *errmsg, *details;
             int errcode = ncf_error(driver->netcf, &errmsg, &details);
             virReportError(netcf_to_vir_err(errcode),
-                           _("failed to begin transaction: %s%s%s"),
+                           _("failed to begin transaction: %1$s%2$s%3$s"),
                            errmsg, details ? " - " : "",
                            NULLSTR_EMPTY(details));
         }
@@ -1110,7 +1110,7 @@ static int netcfInterfaceChangeCommit(virConnectPtr conn, unsigned int flags)
             const char *errmsg, *details;
             int errcode = ncf_error(driver->netcf, &errmsg, &details);
             virReportError(netcf_to_vir_err(errcode),
-                           _("failed to commit transaction: %s%s%s"),
+                           _("failed to commit transaction: %1$s%2$s%3$s"),
                            errmsg, details ? " - " : "",
                            NULLSTR_EMPTY(details));
         }
@@ -1134,7 +1134,7 @@ static int netcfInterfaceChangeRollback(virConnectPtr conn, unsigned int flags)
             const char *errmsg, *details;
             int errcode = ncf_error(driver->netcf, &errmsg, &details);
             virReportError(netcf_to_vir_err(errcode),
-                           _("failed to rollback transaction: %s%s%s"),
+                           _("failed to rollback transaction: %1$s%2$s%3$s"),
                            errmsg, details ? " - " : "",
                            NULLSTR_EMPTY(details));
         }
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index cba14f91f8..a0485ddd21 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -148,7 +148,7 @@ udevNumOfInterfacesByStatus(virConnectPtr conn, virUdevStatus status,
 
     if (!enumerate) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to get number of %s interfaces on host"),
+                       _("failed to get number of %1$s interfaces on host"),
                        virUdevStatusString(status));
         count = -1;
         goto cleanup;
@@ -200,7 +200,7 @@ udevListInterfacesByStatus(virConnectPtr conn,
 
     if (!enumerate) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to get list of %s interfaces on host"),
+                       _("failed to get list of %1$s interfaces on host"),
                        virUdevStatusString(status));
         udev_unref(udev);
         return -1;
@@ -314,7 +314,7 @@ udevConnectListAllInterfaces(virConnectPtr conn,
 
     if (!enumerate) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to get list of %s interfaces on host"),
+                       _("failed to get list of %1$s interfaces on host"),
                        virUdevStatusString(status));
         goto cleanup;
     }
@@ -414,7 +414,7 @@ udevInterfaceLookupByName(virConnectPtr conn, const char *name)
     dev = udev_device_new_from_subsystem_sysname(udev, "net", name);
     if (!dev) {
         virReportError(VIR_ERR_NO_INTERFACE,
-                       _("couldn't find interface named '%s'"),
+                       _("couldn't find interface named '%1$s'"),
                        name);
         goto cleanup;
     }
@@ -448,7 +448,7 @@ udevInterfaceLookupByMACString(virConnectPtr conn, const char *macstr)
 
     if (!enumerate) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to lookup interface with MAC address '%s'"),
+                       _("failed to lookup interface with MAC address '%1$s'"),
                        macstr);
         goto cleanup;
     }
@@ -465,7 +465,7 @@ udevInterfaceLookupByMACString(virConnectPtr conn, const char *macstr)
     /* Check that we got something back */
     if (!dev_entry) {
         virReportError(VIR_ERR_NO_INTERFACE,
-                       _("couldn't find interface with MAC address '%s'"),
+                       _("couldn't find interface with MAC address '%1$s'"),
                        macstr);
         goto cleanup;
     }
@@ -473,7 +473,7 @@ udevInterfaceLookupByMACString(virConnectPtr conn, const char *macstr)
     /* Check that we didn't get multiple items back */
     if (udev_list_entry_get_next(dev_entry)) {
         virReportError(VIR_ERR_MULTIPLE_INTERFACES,
-                       _("the MAC address '%s' matches multiple interfaces"),
+                       _("the MAC address '%1$s' matches multiple interfaces"),
                        macstr);
         goto cleanup;
     }
@@ -568,12 +568,12 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/downdelay");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/downdelay' for '%s'"), name);
+                _("Could not retrieve 'bonding/downdelay' for '%1$s'"), name);
         goto error;
     }
     if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bonding/downdelay' '%s' for '%s'"),
+                _("Could not parse 'bonding/downdelay' '%1$s' for '%2$s'"),
                 tmp_str, name);
         goto error;
     }
@@ -582,12 +582,12 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/updelay");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/updelay' for '%s'"), name);
+                _("Could not retrieve 'bonding/updelay' for '%1$s'"), name);
         goto error;
     }
     if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bonding/updelay' '%s' for '%s'"),
+                _("Could not parse 'bonding/updelay' '%1$s' for '%2$s'"),
                 tmp_str, name);
         goto error;
     }
@@ -596,12 +596,12 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/miimon");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/miimon' for '%s'"), name);
+                _("Could not retrieve 'bonding/miimon' for '%1$s'"), name);
         goto error;
     }
     if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bonding/miimon' '%s' for '%s'"),
+                _("Could not parse 'bonding/miimon' '%1$s' for '%2$s'"),
                 tmp_str, name);
         goto error;
     }
@@ -610,12 +610,12 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/arp_interval");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/arp_interval' for '%s'"), name);
+                _("Could not retrieve 'bonding/arp_interval' for '%1$s'"), name);
         goto error;
     }
     if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bonding/arp_interval' '%s' for '%s'"),
+                _("Could not parse 'bonding/arp_interval' '%1$s' for '%2$s'"),
                 tmp_str, name);
         goto error;
     }
@@ -629,24 +629,24 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/mode");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/mode' for '%s'"), name);
+                _("Could not retrieve 'bonding/mode' for '%1$s'"), name);
         goto error;
     }
     tmp_str = strchr(tmp_str, ' ');
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Invalid format for 'bonding/mode' for '%s'"), name);
+                _("Invalid format for 'bonding/mode' for '%1$s'"), name);
         goto error;
     }
     if (strlen(tmp_str) < 2) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Unable to find correct value in 'bonding/mode' for '%s'"),
+                _("Unable to find correct value in 'bonding/mode' for '%1$s'"),
                 name);
         goto error;
     }
     if (virStrToLong_i(tmp_str + 1, NULL, 10, &tmp_int) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bonding/mode' '%s' for '%s'"),
+                _("Could not parse 'bonding/mode' '%1$s' for '%2$s'"),
                 tmp_str, name);
         goto error;
     }
@@ -659,24 +659,24 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/arp_validate");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/arp_validate' for '%s'"), name);
+                _("Could not retrieve 'bonding/arp_validate' for '%1$s'"), name);
         goto error;
     }
     tmp_str = strchr(tmp_str, ' ');
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Invalid format for 'bonding/arp_validate' for '%s'"), name);
+                _("Invalid format for 'bonding/arp_validate' for '%1$s'"), name);
         goto error;
     }
     if (strlen(tmp_str) < 2) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Unable to find correct value in 'bonding/arp_validate' "
-                "for '%s'"), name);
+                _("Unable to find correct value in 'bonding/arp_validate' for '%1$s'"),
+                name);
         goto error;
     }
     if (virStrToLong_i(tmp_str + 1, NULL, 10, &tmp_int) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bonding/arp_validate' '%s' for '%s'"),
+                _("Could not parse 'bonding/arp_validate' '%1$s' for '%2$s'"),
                 tmp_str, name);
         goto error;
     }
@@ -686,12 +686,12 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/use_carrier");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/use_carrier' for '%s'"), name);
+                _("Could not retrieve 'bonding/use_carrier' for '%1$s'"), name);
         goto error;
     }
     if (virStrToLong_i(tmp_str, NULL, 10, &tmp_int) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bonding/use_carrier' '%s' for '%s'"),
+                _("Could not parse 'bonding/use_carrier' '%1$s' for '%2$s'"),
                 tmp_str, name);
         goto error;
     }
@@ -711,7 +711,7 @@ udevGetIfaceDefBond(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bonding/arp_ip_target");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bonding/arp_ip_target' for '%s'"), name);
+                _("Could not retrieve 'bonding/arp_ip_target' for '%1$s'"), name);
         goto error;
     }
     ifacedef->data.bond.target = g_strdup(tmp_str);
@@ -723,7 +723,7 @@ udevGetIfaceDefBond(struct udev *udev,
 
     if (slave_count < 0) {
         virReportSystemError(errno,
-                _("Could not get slaves of bond '%s'"), name);
+                             _("Could not get slaves of bond '%1$s'"), name);
         goto error;
     }
 
@@ -739,8 +739,8 @@ udevGetIfaceDefBond(struct udev *udev,
         tmp_str = strchr(slave_list[i]->d_name, '_');
         if (!tmp_str || strlen(tmp_str) < 2) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Invalid enslaved interface name '%s' seen for "
-                             "bond '%s'"), slave_list[i]->d_name, name);
+                           _("Invalid enslaved interface name '%1$s' seen for bond '%2$s'"),
+                           slave_list[i]->d_name, name);
             goto error;
         }
         /* go past the _ */
@@ -750,8 +750,8 @@ udevGetIfaceDefBond(struct udev *udev,
             udevGetIfaceDef(udev, tmp_str);
         if (!ifacedef->data.bond.itf[i]) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not get interface information for '%s', which is "
-                  "a enslaved in bond '%s'"), slave_list[i]->d_name, name);
+                           _("Could not get interface information for '%1$s', which is a enslaved in bond '%2$s'"),
+                           slave_list[i]->d_name, name);
             goto error;
         }
         VIR_FREE(slave_list[i]);
@@ -791,7 +791,8 @@ udevGetIfaceDefBridge(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bridge/forward_delay");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not retrieve 'bridge/forward_delay' for '%s'"), name);
+                       _("Could not retrieve 'bridge/forward_delay' for '%1$s'"),
+                       name);
         goto error;
     }
 
@@ -801,14 +802,15 @@ udevGetIfaceDefBridge(struct udev *udev,
     tmp_str = udev_device_get_sysattr_value(dev, "bridge/stp_state");
     if (!tmp_str) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-            _("Could not retrieve 'bridge/stp_state' for '%s'"), name);
+                       _("Could not retrieve 'bridge/stp_state' for '%1$s'"),
+                       name);
         goto error;
     }
 
     if (virStrToLong_i(tmp_str, NULL, 10, &stp) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse 'bridge/stp_state' '%s' for '%s'"),
-                tmp_str, name);
+                       _("Could not parse 'bridge/stp_state' '%1$s' for '%2$s'"),
+                       tmp_str, name);
         goto error;
     }
 
@@ -820,8 +822,8 @@ udevGetIfaceDefBridge(struct udev *udev,
         break;
     default:
         virReportError(VIR_ERR_INTERNAL_ERROR,
-            _("Invalid STP state value %d received for '%s'. Must be "
-              "-1, 0, or 1."), stp, name);
+                       _("Invalid STP state value %1$d received for '%2$s'. Must be -1, 0, or 1."),
+                       stp, name);
         goto error;
     }
 
@@ -837,7 +839,7 @@ udevGetIfaceDefBridge(struct udev *udev,
 
     if (member_count < 0) {
         virReportSystemError(errno,
-                _("Could not get members of bridge '%s'"),
+                _("Could not get members of bridge '%1$s'"),
                 name);
         goto error;
     }
@@ -852,8 +854,8 @@ udevGetIfaceDefBridge(struct udev *udev,
             udevGetIfaceDef(udev, member_list[i]->d_name);
         if (!ifacedef->data.bridge.itf[i]) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not get interface information for '%s', which is "
-                  "a member of bridge '%s'"), member_list[i]->d_name, name);
+                _("Could not get interface information for '%1$s', which is a member of bridge '%2$s'"),
+                member_list[i]->d_name, name);
             goto error;
         }
         VIR_FREE(member_list[i]);
@@ -893,7 +895,7 @@ udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED,
 
     if ((vid_pos = strstr(buf, vid_prefix)) == NULL) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to find the VID for the VLAN device '%s'"),
+                       _("failed to find the VID for the VLAN device '%1$s'"),
                        name);
         return -1;
     }
@@ -902,14 +904,14 @@ udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED,
     if ((vid_len = strspn(vid_pos, "0123456789")) == 0 ||
         !g_ascii_isspace(vid_pos[vid_len])) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to find the VID for the VLAN device '%s'"),
+                       _("failed to find the VID for the VLAN device '%1$s'"),
                        name);
         return -1;
     }
 
     if ((dev_pos = strstr(vid_pos + vid_len, dev_prefix)) == NULL) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to find the real device for the VLAN device '%s'"),
+                       _("failed to find the real device for the VLAN device '%1$s'"),
                        name);
         return -1;
     }
@@ -917,7 +919,7 @@ udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED,
 
     if ((dev_len = strcspn(dev_pos, "\n")) == 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("failed to find the real device for the VLAN device '%s'"),
+                       _("failed to find the real device for the VLAN device '%1$s'"),
                        name);
         return -1;
     }
@@ -949,7 +951,7 @@ udevGetIfaceDef(struct udev *udev, const char *name)
     dev = udev_device_new_from_subsystem_sysname(udev, "net", name);
     if (!dev) {
         virReportError(VIR_ERR_NO_INTERFACE,
-                       _("couldn't find interface named '%s'"), name);
+                       _("couldn't find interface named '%1$s'"), name);
         goto error;
     }
 
@@ -964,7 +966,7 @@ udevGetIfaceDef(struct udev *udev, const char *name)
     mtu_str = udev_device_get_sysattr_value(dev, "mtu");
     if (virStrToLong_ui(mtu_str, NULL, 10, &mtu) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not parse MTU value '%s'"), mtu_str);
+                _("Could not parse MTU value '%1$s'"), mtu_str);
         goto error;
     }
     ifacedef->mtu = mtu;
@@ -1075,7 +1077,7 @@ udevInterfaceIsActive(virInterfacePtr ifinfo)
                                                  ifinfo->name);
     if (!dev) {
         virReportError(VIR_ERR_NO_INTERFACE,
-                       _("couldn't find interface named '%s'"),
+                       _("couldn't find interface named '%1$s'"),
                        ifinfo->name);
         goto cleanup;
     }
@@ -1130,7 +1132,7 @@ udevStateInitialize(bool privileged,
     }
 
     if (g_mkdir_with_parents(driver->stateDir, S_IRWXU) < 0) {
-        virReportSystemError(errno, _("cannot create state directory '%s'"),
+        virReportSystemError(errno, _("cannot create state directory '%1$s'"),
                              driver->stateDir);
         goto cleanup;
     }
-- 
2.39.2




[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]

  Powered by Linux