if (virFileResolveLink(driver_link, &devpath) < 0) {
virReportSystemError(errno,
- _("cannot resolve driver link %s"), driver_link);
+ _("cannot resolve driver link %1$s"), driver_link);
return -1;
}
if (!(obj = virNodeDeviceObjListFindByName(driver->devs, name))) {
virReportError(VIR_ERR_NO_NODE_DEVICE,
- _("no node device with matching name '%s'"),
+ _("no node device with matching name '%1$s'"),
name);
}
default:
/* SHOULD NEVER HAPPEN */
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown Command '%i'"), cmd_type);
+ _("Unknown Command '%1$i'"), cmd_type);
return NULL;
}
case MDEVCTL_CMD_DEFINE:
if (!def->caps->data.mdev.parent_addr) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unable to find parent device '%s'"), def->parent);
+ _("unable to find parent device '%1$s'"), def->parent);
return NULL;
}
if (status != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to start mediated device: %s"),
+ _("Unable to start mediated device: %1$s"),
MDEVCTL_ERROR(errmsg));
return -1;
}
if (status != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to define mediated device: %s"),
+ _("Unable to define mediated device: %1$s"),
MDEVCTL_ERROR(errmsg));
return -1;
}
if (device == NULL)
virReportError(VIR_ERR_NO_NODE_DEVICE,
- _("no node device for '%s' with matching "
- "wwnn '%s' and wwpn '%s'"),
+ _("no node device for '%1$s' with matching wwnn '%2$s' and wwpn '%3$s'"),
def->name, wwnn, wwpn);
} else if (nodeDeviceHasCapability(def, VIR_NODE_DEV_CAP_MDEV)) {
device = nodeDeviceCreateXMLMdev(conn, def);
if (status != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to destroy '%s': %s"), def->name,
+ _("Unable to destroy '%1$s': %2$s"), def->name,
MDEVCTL_ERROR(errmsg));
return -1;
}
if (status != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to undefine mediated device: %s"),
+ _("Unable to undefine mediated device: %1$s"),
MDEVCTL_ERROR(errmsg));
return -1;
}
if (status != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to create mediated device: %s"),
+ _("Unable to create mediated device: %1$s"),
MDEVCTL_ERROR(errmsg));
return -1;
}
if (!(obj = virNodeDeviceObjListFindByName(driver->devs, parent))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot find parent '%s' definition"), parent);
+ _("cannot find parent '%1$s' definition"), parent);
goto cleanup;
}
if (!virNodeDeviceObjIsActive(obj)) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("Device '%s' is not active"), def->name);
+ _("Device '%1$s' is not active"), def->name);
goto cleanup;
}
if (fd < 0 && errno == EBUSY) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to destroy '%s': device in use"),
+ _("Unable to destroy '%1$s': device in use"),
def->name);
goto cleanup;
}
if (!virNodeDeviceObjIsPersistent(obj)) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("Node device '%s' is not defined"),
+ _("Node device '%1$s' is not defined"),
def->name);
goto cleanup;
}
if ((data.ndefs = virMdevctlListDefined(&defs, &errmsg)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to query mdevs from mdevctl: %s"), errmsg);
+ _("failed to query mdevs from mdevctl: %1$s"), errmsg);
return -1;
}
if (virMdevctlSetAutostart(def, autostart, &errmsg) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to set autostart on '%s': %s"),
+ _("Unable to set autostart on '%1$s': %2$s"),
def->name,
errmsg && errmsg[0] != '\0' ? errmsg : _("Unknown Error"));
goto cleanup;
obj = virNodeDeviceObjListFindByName(driver->devs, def->parent);
if (!obj) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("invalid parent device '%s'"),
+ _("invalid parent device '%1$s'"),
def->parent);
return -1;
}
* device and stored it in the mdev caps */
if (!mdev->parent_addr) {
virReportError(VIR_ERR_PARSE_FAILED,
- _("Unable to find address for parent device '%s'"),
+ _("Unable to find address for parent device '%1$s'"),
def->parent);
return -1;
}
str = udevGetDeviceProperty(udev_device, property_key);
if (!str) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing udev property '%s' on '%s'"),
+ _("Missing udev property '%1$s' on '%2$s'"),
property_key, udev_device_get_sysname(udev_device));
return -1;
}
if (virStrToLong_i(str, NULL, base, value) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to parse int '%s' from udev property '%s' on '%s'"),
+ _("Failed to parse int '%1$s' from udev property '%2$s' on '%3$s'"),
str, property_key, udev_device_get_sysname(udev_device));
return -1;
}
str = udevGetDeviceProperty(udev_device, property_key);
if (!str) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Missing udev property '%s' on '%s'"),
+ _("Missing udev property '%1$s' on '%2$s'"),
property_key, udev_device_get_sysname(udev_device));
return -1;
}
if (virStrToLong_ui(str, NULL, base, value) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to parse uint '%s' from udev property '%s' on '%s'"),
+ _("Failed to parse uint '%1$s' from udev property '%2$s' on '%3$s'"),
str, property_key, udev_device_get_sysname(udev_device));
return -1;
}
if (str && virStrToLong_i(str, NULL, base, value) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to convert '%s' to int"), str);
+ _("Failed to convert '%1$s' to int"), str);
return -1;
}
if (str && virStrToLong_ui(str, NULL, base, value) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to convert '%s' to unsigned int"), str);
+ _("Failed to convert '%1$s' to unsigned int"), str);
return -1;
}
if (str && virStrToLong_ull(str, NULL, 0, value) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to convert '%s' to unsigned long long"), str);
+ _("Failed to convert '%1$s' to unsigned long long"), str);
return -1;
}
virStrToLong_ui(p + 1, &p, 16, &pci_dev->slot) < 0 || p == NULL ||
virStrToLong_ui(p + 1, &p, 16, &pci_dev->function) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse the PCI address from sysfs path: '%s'"),
+ _("failed to parse the PCI address from sysfs path: '%1$s'"),
def->sysfs_path);
goto cleanup;
}
if (virMediatedDeviceParentGetAddress(def->sysfs_path, &mdev_parent->address) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find address for mdev parent device '%s'"),
+ _("Unable to find address for mdev parent device '%1$s'"),
def->name);
return -1;
}
if (!(str = STRSKIP(filename, "host")) ||
virStrToLong_ui(str, NULL, 0, &scsi_host->host) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse SCSI host '%s'"),
+ _("failed to parse SCSI host '%1$s'"),
filename);
return -1;
}
virStrToLong_ui(p + 1, &p, 10, &scsi->target) < 0 || p == NULL ||
virStrToLong_ui(p + 1, &p, 10, &scsi->lun) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse the SCSI address from filename: '%s'"),
+ _("failed to parse the SCSI address from filename: '%1$s'"),
filename);
return -1;
}
cleanup:
if (ret != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to process SCSI device with sysfs path '%s'"),
+ _("Failed to process SCSI device with sysfs path '%1$s'"),
def->sysfs_path);
}
return ret;
if (virFileWaitForExists(linkpath, 10, 100) < 0) {
virReportSystemError(errno,
- _("failed to wait for file '%s' to appear"),
+ _("failed to wait for file '%1$s' to appear"),
linkpath);
return -1;
}
if (virFileResolveLink(linkpath, &canonicalpath) < 0) {
- virReportSystemError(errno, _("failed to resolve '%s'"), linkpath);
+ virReportSystemError(errno, _("failed to resolve '%1$s'"), linkpath);
return -1;
}
if (!data->parent_addr) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get parent of '%s'"),
+ _("Could not get parent of '%1$s'"),
udev_device_get_syspath(dev));
return -1;
}
&data->ccw_dev.ssid,
&data->ccw_dev.devno) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse the CCW address from sysfs path: '%s'"),
+ _("failed to parse the CCW address from sysfs path: '%1$s'"),
sysfs_path);
return -1;
}
if (!virFileExists(chardev)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("vDPA chardev path '%s' does not exist"),
+ _("vDPA chardev path '%1$s' does not exist"),
chardev);
return -1;
}
virStrToLong_ui(c + 1 + strlen("card"), NULL, 16,
&data->ap_card.ap_adapter) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse the AP Card from sysfs path: '%s'"),
+ _("failed to parse the AP Card from sysfs path: '%1$s'"),
def->sysfs_path);
return -1;
}
virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_adapter) < 0 ||
virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_domain) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to parse the AP Queue from sysfs path: '%s'"),
+ _("failed to parse the AP Queue from sysfs path: '%1$s'"),
def->sysfs_path);
return -1;
}
parent_sysfs_path = udev_device_get_syspath(parent_device);
if (parent_sysfs_path == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get syspath for parent of '%s'"),
+ _("Could not get syspath for parent of '%1$s'"),
udev_device_get_syspath(parent_device));
return -1;
}
rc = udev_monitor_get_fd(priv->udev_monitor);
if (fd != rc) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("File descriptor returned by udev %d does not "
- "match node device file descriptor %d"),
+ _("File descriptor returned by udev %1$d does not match node device file descriptor %2$d"),
fd, rc);
/* this is a non-recoverable error, let's remove the handle, so that we
device = udev_device_new_from_syspath(udev, DMI_DEVPATH);
if (device == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to get udev device for syspath '%s'"),
+ _("Failed to get udev device for syspath '%1$s'"),
DMI_DEVPATH);
return;
}
error:
g_list_free_full(monitors, g_object_unref);
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to monitor directory: %s"), error->message);
+ _("Unable to monitor directory: %1$s"), error->message);
g_clear_error(&error);
return NULL;
}
}
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;
}