if (STRNEQ(uriPath, "/system") && !compatSessionRoot) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected %s URI path '%s', try "
- "%s:///system"),
+ _("unexpected %1$s URI path '%2$s', try %3$s:///system"),
entityName, uriPath, entityName);
return false;
}
} else {
if (STRNEQ(uriPath, "/session")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected %s URI path '%s', try "
- "%s:///session"),
+ _("unexpected %1$s URI path '%2$s', try %3$s:///session"),
entityName, uriPath, entityName);
return false;
}
unsigned int __unsuppflags = flags & ~(supported); \
if (__uiflags != flags) { \
virReportInvalidArg(flags, \
- _("unsupported use of long flags in function %s"), \
+ _("unsupported use of long flags in function %1$s"), \
__FUNCTION__); \
return retval; \
} \
if (__unsuppflags) { \
virReportInvalidArg(flags, \
- _("unsupported flags (0x%x) in function %s"), \
+ _("unsupported flags (0x%1$x) in function %2$s"), \
__unsuppflags, __FUNCTION__); \
return retval; \
} \
unsigned int __unsuppflags = flags & ~(supported); \
if (__uiflags != flags) { \
virReportInvalidArg(flags, \
- _("unsupported use of long flags in function %s"), \
+ _("unsupported use of long flags in function %1$s"), \
__FUNCTION__); \
goto label; \
} \
if (__unsuppflags) { \
virReportInvalidArg(flags, \
- _("unsupported flags (0x%x) in function %s"), \
+ _("unsupported flags (0x%1$x) in function %2$s"), \
__unsuppflags, __FUNCTION__); \
goto label; \
} \
do { \
if ((flags & FLAG1) && (flags & FLAG2)) { \
virReportInvalidArg(ctl, \
- _("Flags '%s' and '%s' are mutually " \
- "exclusive"), \
+ _("Flags '%1$s' and '%2$s' are mutually exclusive"), \
#FLAG1, #FLAG2); \
return RET; \
} \
do { \
if ((flags & FLAG1) && (flags & FLAG2)) { \
virReportInvalidArg(ctl, \
- _("Flags '%s' and '%s' are mutually " \
- "exclusive"), \
+ _("Flags '%1$s' and '%2$s' are mutually exclusive"), \
#FLAG1, #FLAG2); \
goto LABEL; \
} \
do { \
if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \
virReportInvalidArg(ctl, \
- _("Flag '%s' is required by flag '%s'"), \
+ _("Flag '%1$s' is required by flag '%2$s'"), \
#FLAG2, #FLAG1); \
return RET; \
} \
do { \
if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \
virReportInvalidArg(ctl, \
- _("Flag '%s' is required by flag '%s'"), \
+ _("Flag '%1$s' is required by flag '%2$s'"), \
#FLAG2, #FLAG1); \
goto LABEL; \
} \
#define virCheckReadOnlyGoto(flags, label) \
do { \
if ((flags) & VIR_CONNECT_RO) { \
- virReportRestrictedError(_("read only access prevents %s"), \
+ virReportRestrictedError(_("read only access prevents %1$s"), \
__FUNCTION__); \
goto label; \
} \
virCheckNonNullArgGoto(to, error);
if (dumpformat >= VIR_DOMAIN_CORE_DUMP_FORMAT_LAST) {
- virReportInvalidArg(flags, _("dumpformat '%d' is not supported"),
+ virReportInvalidArg(flags, _("dumpformat '%1$d' is not supported"),
dumpformat);
goto error;
}
if (domain->conn != stream->conn) {
virReportInvalidArg(stream,
- _("stream must match connection of domain '%s'"),
+ _("stream must match connection of domain '%1$s'"),
domain->name);
goto error;
}
if (ret == 0)
goto error;
if ((unsigned long) ret != ret) {
- virReportError(VIR_ERR_OVERFLOW, _("result too large: %llu"),
+ virReportError(VIR_ERR_OVERFLOW, _("result too large: %1$llu"),
ret);
goto error;
}
virCheckNonZeroArgGoto(memory, error);
if (virMemoryMaxValue(true) / 1024 <= memory) {
- virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"),
+ virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"),
memory);
goto error;
}
virCheckNonZeroArgGoto(memory, error);
if (virMemoryMaxValue(true) / 1024 <= memory) {
- virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"),
+ virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"),
memory);
goto error;
}
virCheckNonZeroArgGoto(memory, error);
if (virMemoryMaxValue(true) / 1024 <= memory) {
- virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"),
+ virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"),
memory);
goto error;
}
virCheckNonNullArgGoto(stats, error);
if (size > sizeof(stats2)) {
virReportInvalidArg(size,
- _("size must not exceed %zu"),
+ _("size must not exceed %1$zu"),
sizeof(stats2));
goto error;
}
virCheckNonNullArgGoto(stats, error);
if (size > sizeof(stats2)) {
virReportInvalidArg(size,
- _("size must not exceed %zu"),
+ _("size must not exceed %1$zu"),
sizeof(stats2));
goto error;
}
if (codeset >= VIR_KEYCODE_SET_LAST) {
virReportInvalidArg(codeset,
- _("Unsupported codeset '%d'"),
+ _("Unsupported codeset '%1$d'"),
codeset);
goto error;
}
if (nkeycodes > VIR_DOMAIN_SEND_KEY_MAX_KEYS) {
virReportInvalidArg(nkeycodes,
- _("nkeycodes must be <= %d"),
+ _("nkeycodes must be <= %1$d"),
VIR_DOMAIN_SEND_KEY_MAX_KEYS);
goto error;
}
virCheckPositiveArgGoto(maplen, error);
if (VIR_INT_MULTIPLY_OVERFLOW(ncpumaps, maplen)) {
- virReportError(VIR_ERR_OVERFLOW, _("input too large: %d * %d"),
+ virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$d * %2$d"),
ncpumaps, maplen);
goto error;
}
virCheckZeroArgGoto(maplen, error);
if (cpumaps && VIR_INT_MULTIPLY_OVERFLOW(maxinfo, maplen)) {
- virReportError(VIR_ERR_OVERFLOW, _("input too large: %d * %d"),
+ virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$d * %2$d"),
maxinfo, maplen);
goto error;
}
virCheckDomainGoto(dom, error);
if (dom->conn != conn) {
virReportInvalidArg(dom,
- _("domain '%s' must match connection"),
+ _("domain '%1$s' must match connection"),
dom->name);
goto error;
}
virCheckNonNegativeArgGoto(eventID, error);
if (eventID >= VIR_DOMAIN_EVENT_ID_LAST) {
virReportInvalidArg(eventID,
- _("eventID must be less than %d"),
+ _("eventID must be less than %1$d"),
VIR_DOMAIN_EVENT_ID_LAST);
goto error;
}
if (conn != st->conn) {
virReportInvalidArg(st,
- _("stream must match connection of domain '%s'"),
+ _("stream must match connection of domain '%1$s'"),
dom->name);
goto error;
}
if (conn != st->conn) {
virReportInvalidArg(st,
- _("stream must match connection of domain '%s'"),
+ _("stream must match connection of domain '%1$s'"),
dom->name);
goto error;
}
if (fstat(fd, &sb) < 0) {
virReportSystemError(errno,
- _("Unable to access file descriptor %d"), fd);
+ _("Unable to access file descriptor %1$d"), fd);
goto error;
}
#ifndef WIN32
if (!S_ISSOCK(sb.st_mode)) {
virReportInvalidArg(fd,
- _("fd %d must be a socket"),
+ _("fd %1$d must be a socket"),
fd);
goto error;
}
virCheckNullArgGoto(params, error);
if (nparams && ncpus > UINT_MAX / nparams) {
- virReportError(VIR_ERR_OVERFLOW, _("input too large: %u * %u"),
+ virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$u * %2$u"),
nparams, ncpus);
goto error;
}
if (!*doms) {
virReportError(VIR_ERR_INVALID_ARG,
- _("doms array in %s must contain at least one domain"),
+ _("doms array in %1$s must contain at least one domain"),
__FUNCTION__);
goto cleanup;
}
if (type >= VIR_DOMAIN_LIFECYCLE_LAST) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid lifecycle type '%u'"), type);
+ _("invalid lifecycle type '%1$u'"), type);
goto error;
}
if (action >= VIR_DOMAIN_LIFECYCLE_ACTION_LAST) {
virReportError(VIR_ERR_INVALID_ARG,
- _("invalid lifecycle action '%u'"), action);
+ _("invalid lifecycle action '%1$u'"), action);
goto error;
}
virCheckNonNegativeArgGoto(*nparams, error);
if (cpuNum < 0 && cpuNum != VIR_NODE_CPU_STATS_ALL_CPUS) {
virReportInvalidArg(cpuNum,
- _("cpuNum in %s only accepts %d as a negative "
- "value"),
+ _("cpuNum in %1$s only accepts %2$d as a negative value"),
__FUNCTION__, VIR_NODE_CPU_STATS_ALL_CPUS);
goto error;
}
virCheckNonNegativeArgGoto(*nparams, error);
if (cellNum < 0 && cellNum != VIR_NODE_MEMORY_STATS_ALL_CELLS) {
virReportInvalidArg(cpuNum,
- _("cellNum in %s only accepts %d as a negative "
- "value"),
+ _("cellNum in %1$s only accepts %2$d as a negative value"),
__FUNCTION__, VIR_NODE_MEMORY_STATS_ALL_CELLS);
goto error;
}
if (getcon(&ctx) < 0) {
virReportSystemError(errno,
- _("unable to get PID %d security context"),
+ _("unable to get PID %1$d security context"),
getpid());
goto error;
}
if (virStrcpy(oldlabel->label, ctx, VIR_SECURITY_LABEL_BUFLEN) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("security label exceeds "
- "maximum length: %d"),
+ _("security label exceeds maximum length: %1$d"),
VIR_SECURITY_LABEL_BUFLEN - 1);
freecon(ctx);
goto error;
if (setexeccon(label->label) < 0) {
virReportSystemError(errno,
- _("Cannot set context %s"),
+ _("Cannot set context %1$s"),
label->label);
goto error;
}
} else if (STREQ(model->model, "apparmor")) {
#ifdef WITH_APPARMOR
if (aa_change_profile(label->label) < 0) {
- virReportSystemError(errno, _("error changing profile to %s"),
+ virReportSystemError(errno, _("error changing profile to %1$s"),
label->label);
goto error;
}
/* nothing todo */
} else {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
- _("Security model %s cannot be entered"),
+ _("Security model %1$s cannot be entered"),
model->model);
goto error;
}
if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr,
- _("uuidstr in %s must be a valid UUID"),
+ _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__);
goto error;
}
virCheckNetworkGoto(net, error);
if (net->conn != conn) {
virReportInvalidArg(net,
- _("network '%s' in %s must match connection"),
+ _("network '%1$s' in %2$s must match connection"),
net->name, __FUNCTION__);
goto error;
}
if (eventID >= VIR_NETWORK_EVENT_ID_LAST) {
virReportInvalidArg(eventID,
- _("eventID in %s must be less than %d"),
+ _("eventID in %1$s must be less than %2$d"),
__FUNCTION__, VIR_NETWORK_EVENT_ID_LAST);
goto error;
}
if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr,
- _("uuidstr in %s must be a valid UUID"),
+ _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__);
goto error;
}
virCheckNodeDeviceGoto(dev, error);
if (dev->conn != conn) {
virReportInvalidArg(dev,
- _("node device '%s' in %s must match connection"),
+ _("node device '%1$s' in %2$s must match connection"),
dev->name, __FUNCTION__);
goto error;
}
if (eventID >= VIR_NODE_DEVICE_EVENT_ID_LAST) {
virReportInvalidArg(eventID,
- _("eventID in %s must be less than %d"),
+ _("eventID in %1$s must be less than %2$d"),
__FUNCTION__, VIR_NODE_DEVICE_EVENT_ID_LAST);
goto error;
}
if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr,
- _("uuidstr in %s must be a valid UUID"),
+ _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__);
goto error;
}
virCheckNonZeroArgGoto(pid_value, error);
if (pid != pid_value) {
virReportInvalidArg(pid_value,
- _("pid_value in %s is too large"),
+ _("pid_value in %1$s is too large"),
__FUNCTION__);
goto error;
}
virCheckDomainGoto(dom, error);
if (dom->conn != conn) {
virReportInvalidArg(dom,
- _("domain '%s' in %s must match connection"),
+ _("domain '%1$s' in %2$s must match connection"),
dom->name, __FUNCTION__);
goto error;
}
if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr,
- _("uuidstr in %s must be a valid UUID"),
+ _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__);
goto error;
}
char uuidstr[VIR_UUID_STRING_BUFLEN];
virUUIDFormat(secret->uuid, uuidstr);
virReportInvalidArg(secret,
- _("secret '%s' in %s must match connection"),
+ _("secret '%1$s' in %2$s must match connection"),
uuidstr, __FUNCTION__);
goto error;
}
if (eventID >= VIR_SECRET_EVENT_ID_LAST) {
virReportInvalidArg(eventID,
- _("eventID in %s must be less than %d"),
+ _("eventID in %1$s must be less than %2$d"),
__FUNCTION__, VIR_SECRET_EVENT_ID_LAST);
goto error;
}
if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr,
- _("uuidstr in %s must be a valid UUID"),
+ _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__);
goto error;
}
if (vol->conn != stream->conn) {
virReportInvalidArg(stream,
- _("stream in %s must match connection of volume '%s'"),
+ _("stream in %1$s must match connection of volume '%2$s'"),
__FUNCTION__, vol->name);
goto error;
}
if (vol->conn != stream->conn) {
virReportInvalidArg(stream,
- _("stream in %s must match connection of volume '%s'"),
+ _("stream in %1$s must match connection of volume '%2$s'"),
__FUNCTION__, vol->name);
goto error;
}
if (capacity == 0 && !((flags & VIR_STORAGE_VOL_RESIZE_DELTA) ||
(flags & VIR_STORAGE_VOL_RESIZE_SHRINK))) {
virReportInvalidArg(capacity,
- _("capacity in %s cannot be zero without 'delta' "
- "or 'shrink' flags set"),
+ _("capacity in %1$s cannot be zero without 'delta' or 'shrink' flags set"),
__FUNCTION__);
goto error;
}
virCheckStoragePoolGoto(pool, error);
if (pool->conn != conn) {
virReportInvalidArg(pool,
- _("storage pool '%s' in %s must match connection"),
+ _("storage pool '%1$s' in %2$s must match connection"),
pool->name, __FUNCTION__);
goto error;
}
if (eventID >= VIR_STORAGE_POOL_EVENT_ID_LAST) {
virReportInvalidArg(eventID,
- _("eventID in %s must be less than %d"),
+ _("eventID in %1$s must be less than %2$d"),
__FUNCTION__, VIR_STORAGE_POOL_EVENT_ID_LAST);
goto error;
}
virCheckNonNullArgReturn(driver, -1);
if (virConnectDriverTabCount >= MAX_DRIVERS) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Too many drivers, cannot register %s"),
+ _("Too many drivers, cannot register %1$s"),
driver->hypervisorDriver->name);
return -1;
}
if (virStateDriverTabCount >= MAX_DRIVERS) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Too many drivers, cannot register %s"),
+ _("Too many drivers, cannot register %1$s"),
driver->name);
return -1;
}
opaque);
VIR_DEBUG("State init result %d (mandatory=%d)", ret, mandatory);
if (ret == VIR_DRV_STATE_INIT_ERROR) {
- VIR_ERROR(_("Initialization of %s state driver failed: %s"),
+ VIR_ERROR(_("Initialization of %1$s state driver failed: %2$s"),
virStateDriverTab[i]->name,
virGetLastErrorMessage());
return -1;
}
if (ret == VIR_DRV_STATE_INIT_SKIPPED && mandatory) {
- VIR_ERROR(_("Initialization of mandatory %s state driver skipped"),
+ VIR_ERROR(_("Initialization of mandatory %1$s state driver skipped"),
virStateDriverTab[i]->name);
return -1;
}
if (STREQ(uri->server, "session") ||
STREQ(uri->server, "system")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("invalid URI %s (maybe you want %s:///%s)"),
+ _("invalid URI %1$s (maybe you want %2$s:///%3$s)"),
uristr, uri->scheme, uri->server);
return -1;
}
if (ret->uri->scheme == NULL) {
virReportError(VIR_ERR_NO_CONNECT,
- _("URI '%s' does not include a driver name"),
+ _("URI '%1$s' does not include a driver name"),
name);
return NULL;
}
if (strspn(ret->uri->scheme, "abcdefghijklmnopqrstuvwxyz") !=
strlen(ret->uri->scheme)) {
virReportError(VIR_ERR_NO_CONNECT,
- _("URI scheme '%s' for embedded driver is not valid"),
+ _("URI scheme '%1$s' for embedded driver is not valid"),
ret->uri->scheme);
return NULL;
}
false)) {
virReportErrorHelper(VIR_FROM_NONE, VIR_ERR_CONFIG_UNSUPPORTED,
__FILE__, __FUNCTION__, __LINE__,
- _("libvirt was built without the '%s' driver"),
+ _("libvirt was built without the '%1$s' driver"),
ret->uri->scheme);
return NULL;
}
if (embed && !virConnectDriverTab[i]->embeddable) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Driver %s cannot be used in embedded mode"),
+ _("Driver %1$s cannot be used in embedded mode"),
virConnectDriverTab[i]->hypervisorDriver->name);
return NULL;
}
if (strnlen(params[i].field, VIR_TYPED_PARAM_FIELD_LENGTH) ==
VIR_TYPED_PARAM_FIELD_LENGTH) {
virReportInvalidArg(params,
- _("string parameter name '%.*s' too long"),
+ _("string parameter name '%2$.*1$s' too long"),
VIR_TYPED_PARAM_FIELD_LENGTH,
params[i].field);
return -1;
if (string_okay) {
if (!params[i].value.s) {
virReportInvalidArg(params,
- _("NULL string parameter '%s'"),
+ _("NULL string parameter '%1$s'"),
params[i].field);
return -1;
}
} else {
virReportInvalidArg(params,
- _("string parameter '%s' unsupported"),
+ _("string parameter '%1$s' unsupported"),
params[i].field);
return -1;
}