if (!processorList) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not look up processor(s) on '%s'"),
+ _("Could not look up processor(s) on '%1$s'"),
name);
return -1;
}
return -1;
if (*computerSystemList == NULL) {
- virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %d"), id);
+ virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %1$d"), id);
return -1;
}
if (*computerSystemList == NULL) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("No domain with name %s"), name);
+ _("No domain with name %1$s"), name);
return -1;
}
if (virUUIDParse(computerSystem->data->UUID, uuid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse UUID from string '%s'"),
+ _("Could not parse UUID from string '%1$s'"),
computerSystem->data->UUID);
return -1;
}
return 0;
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to locate parent device with ID '%s'"),
+ _("Failed to locate parent device with ID '%1$s'"),
parentDeviceId);
return -1;
if (def->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT &&
def->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AUTO) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported SCSI controller model '%d'"), def->model);
+ _("Unsupported SCSI controller model '%1$d'"), def->model);
return -1;
}
if (def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported SCSI controller address type '%d'"), def->info.type);
+ _("Unsupported SCSI controller address type '%1$d'"), def->info.type);
return -1;
}
disk->device = VIR_DOMAIN_DISK_DEVICE_FLOPPY;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unrecognized controller type %d"),
+ _("Unrecognized controller type %1$d"),
controller->data->ResourceType);
goto cleanup;
}
if (!os) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get version information for host %s"),
+ _("Could not get version information for host %1$s"),
conn->uri->server);
goto cleanup;
}
if (hypervParseVersionString(priv->version, &major, &minor, µ) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse version from '%s'"),
+ _("Could not parse version from '%1$s'"),
priv->version);
return -1;
}
*/
if (major > 99 || minor > 99 || micro > 999999) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not produce packed version number from '%s'"),
+ _("Could not produce packed version number from '%1$s'"),
priv->version);
return -1;
}
if (!processorSettingData) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get maximum definition of Msvm_ProcessorSettingData for host %s"),
+ _("Could not get maximum definition of Msvm_ProcessorSettingData for host %1$s"),
conn->uri->server);
return -1;
}
/* Fill struct */
if (virStrcpyStatic(info->model, processorList->data->Name) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("CPU model %s too long for destination"),
+ _("CPU model %1$s too long for destination"),
processorList->data->Name);
return -1;
}
if (computerSystem->next) {
virReportError(VIR_ERR_MULTIPLE_DOMAINS,
- _("Multiple domains exist with the name '%s': repeat the request using a UUID"),
+ _("Multiple domains exist with the name '%1$s': repeat the request using a UUID"),
name);
return NULL;
}
if (hypervGetWmiClass(Msvm_ShutdownComponent, &shutdown) < 0 ||
!shutdown) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Could not get Msvm_ShutdownComponent for domain with UUID '%s'"),
+ _("Could not get Msvm_ShutdownComponent for domain with UUID '%1$s'"),
uuid);
return -1;
}
temporaryDirectory = "/tmp";
temporaryFile = g_strdup_printf("%s/libvirt.hyperv.screendump.XXXXXX", temporaryDirectory);
if ((fd = g_mkstemp_full(temporaryFile, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR)) == -1) {
- virReportSystemError(errno, _("g_mkstemp(\"%s\") failed"), temporaryFile);
+ virReportSystemError(errno, _("g_mkstemp(\"%1$s\") failed"), temporaryFile);
goto cleanup;
}
unlinkTemporaryFile = true;
if (virUUIDParse(computerSystem->data->Name, def->uuid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse UUID from string '%s'"),
+ _("Could not parse UUID from string '%1$s'"),
computerSystem->data->Name);
return NULL;
}
if ((domain = hypervDomainLookupByUUID(conn, def->uuid))) {
char uuid_string[VIR_UUID_STRING_BUFLEN];
virUUIDFormat(domain->uuid, uuid_string);
- virReportError(VIR_ERR_DOM_EXIST, _("Domain already exists with UUID '%s'"), uuid_string);
+ virReportError(VIR_ERR_DOM_EXIST, _("Domain already exists with UUID '%1$s'"), uuid_string);
// Don't use the 'exit' label, since we don't want to delete the existing domain.
virObjectUnref(domain);
/* Attach serials */
for (i = 0; i < def->nserials; i++) {
if (hypervDomainAttachSerial(domain, def->serials[i]) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach serial port %zu"), i);
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach serial port %1$zu"), i);
goto error;
}
}
/* Attach networks */
for (i = 0; i < def->nnets; i++) {
if (hypervDomainAttachSyntheticEthernetAdapter(domain, def->nets[i], hostname) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach network %zu"), i);
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not attach network %1$zu"), i);
goto error;
}
}
case VIR_DOMAIN_DEVICE_AUDIO:
case VIR_DOMAIN_DEVICE_CRYPTO:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Attaching devices of type %d is not implemented"), dev->type);
+ _("Attaching devices of type %1$d is not implemented"), dev->type);
return -1;
}
if (!operatingSystem) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get free memory for host %s"),
+ _("Could not get free memory for host %1$s"),
conn->uri->server);
return 0;
}
case DEBUG_LEVEL_ERROR:
case DEBUG_LEVEL_CRITICAL:
case DEBUG_LEVEL_ALWAYS:
- VIR_ERROR(_("openwsman: %s"), message);
+ VIR_ERROR(_("openwsman: %1$s"), message);
break;
case DEBUG_LEVEL_WARNING:
if (virUUIDParse(virtualSwitch->data->Name, uuid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse UUID from string '%s'"),
+ _("Could not parse UUID from string '%1$s'"),
virtualSwitch->data->Name);
return NULL;
}
if (!virtualSwitch) {
virReportError(VIR_ERR_NO_NETWORK,
- _("No network found with property '%s' = '%s'"), property, value);
+ _("No network found with property '%1$s' = '%2$s'"), property, value);
return NULL;
}
if (STRNEQ((*parsedUri)->transport, "http") &&
STRNEQ((*parsedUri)->transport, "https")) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Query parameter 'transport' has unexpected value "
- "'%s' (should be http|https)"),
+ _("Query parameter 'transport' has unexpected value '%1$s' (should be http|https)"),
(*parsedUri)->transport);
goto cleanup;
}
if (lastError != WS_LASTERR_OK) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Transport error during %s: %s (%d)"),
+ _("Transport error during %1$s: %2$s (%3$d)"),
detail, wsman_transport_get_last_error_string(lastError),
lastError);
return -1;
* 400 (Bad Request) or 500 (Internal Server Error) */
if (responseCode != 200 && responseCode != 400 && responseCode != 500) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected HTTP response during %s: %d"),
+ _("Unexpected HTTP response during %1$s: %2$d"),
detail, responseCode);
return -1;
}
if (response == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Empty response during %s"), detail);
+ _("Empty response during %1$s"), detail);
return -1;
}
wsmc_get_fault_data(response, fault);
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("SOAP fault during %s: code '%s', subcode '%s', "
- "reason '%s', detail '%s'"),
+ _("SOAP fault during %1$s: code '%2$s', subcode '%3$s', reason '%4$s', detail '%5$s'"),
detail, NULLSTR(fault->code), NULLSTR(fault->subcode),
NULLSTR(fault->reason), NULLSTR(fault->fault_detail));
if (!(xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri, p->embedded.name,
NULL))) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not add child node %s"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not add child node %1$s"),
p->embedded.name);
return -1;
}
if (faultReason)
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("WS-Management fault during %s invocation: %s"),
+ _("WS-Management fault during %1$s invocation: %2$s"),
params->method, faultReason);
else
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get return value for %s invocation"),
+ _("Could not get return value for %1$s invocation"),
params->method);
return -1;
instanceID = ws_xml_get_xpath_value(response, jobcode_instance_xpath);
if (!instanceID) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get instance ID for %s invocation"),
+ _("Could not get instance ID for %1$s invocation"),
params->method);
return -1;
}
}
if (!completed && timeout < 0) {
virReportError(VIR_ERR_OPERATION_TIMEOUT,
- _("Timeout waiting for %s invocation"), params->method);
+ _("Timeout waiting for %1$s invocation"), params->method);
return -1;
}
} else if (returnCode != CIM_RETURNCODE_COMPLETED_WITH_NO_ERROR) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("Invocation of %s returned an error: %s (%d)"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("Invocation of %1$s returned an error: %2$s (%3$d)"),
params->method, hypervReturnCodeToString(returnCode),
returnCode);
return -1;
if (returnValue == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not lookup %s for %s invocation"),
+ _("Could not lookup %1$s for %2$s invocation"),
"ReturnValue", "RequestStateChange");
return -1;
}
if (virStrToLong_i(returnValue, NULL, 10, &returnCode) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse return code from '%s'"), returnValue);
+ _("Could not parse return code from '%1$s'"), returnValue);
return -1;
}
if (instanceID == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not lookup %s for %s invocation"),
+ _("Could not lookup %1$s for %2$s invocation"),
"InstanceID", "RequestStateChange");
return -1;
}
if (concreteJob == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not lookup %s for %s invocation"),
+ _("Could not lookup %1$s for %2$s invocation"),
"Msvm_ConcreteJob", "RequestStateChange");
return -1;
}
case MSVM_CONCRETEJOB_JOBSTATE_EXCEPTION:
case MSVM_CONCRETEJOB_JOBSTATE_SERVICE:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Concrete job for %s invocation is in error state"),
+ _("Concrete job for %1$s invocation is in error state"),
"RequestStateChange");
return -1;
default:
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Concrete job for %s invocation is in unknown state"),
+ _("Concrete job for %1$s invocation is in unknown state"),
"RequestStateChange");
return -1;
}
}
} else if (returnCode != CIM_RETURNCODE_COMPLETED_WITH_NO_ERROR) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invocation of %s returned an error: %s (%d)"),
+ _("Invocation of %1$s returned an error: %2$s (%3$d)"),
"RequestStateChange", hypervReturnCodeToString(returnCode),
returnCode);
return -1;
if (virUUIDParse(computerSystem->data->Name, uuid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse UUID from string '%s'"),
+ _("Could not parse UUID from string '%1$s'"),
computerSystem->data->Name);
return -1;
}
return -1;
if (!*computerSystem) {
- virReportError(VIR_ERR_NO_DOMAIN, _("No domain with UUID %s"), uuid);
+ virReportError(VIR_ERR_NO_DOMAIN, _("No domain with UUID %1$s"), uuid);
return -1;
}
if (!*data) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not look up resource allocation setting data with virtual system instance ID '%s'"),
+ _("Could not look up resource allocation setting data with virtual system instance ID '%1$s'"),
id);
return -1;
}
if (!*data) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not look up processor setting data with virtual system instance ID '%s'"),
+ _("Could not look up processor setting data with virtual system instance ID '%1$s'"),
id);
return -1;
}