}
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;
}
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);
}
}
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
}
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;
}
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;
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;
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;
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;
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;
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));
}
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));
}
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));
}
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;
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;
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;
}
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;
}
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;
}
/* 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;
}
/* 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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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);
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;
}
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 _ */
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]);
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;
}
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;
}
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;
}
if (member_count < 0) {
virReportSystemError(errno,
- _("Could not get members of bridge '%s'"),
+ _("Could not get members of bridge '%1$s'"),
name);
goto error;
}
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]);
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;
}
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;
}
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;
}
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;
}
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;
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;
}
}
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;
}