src: Update format strings in translated messages

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Jiri Denemark 2023-03-09 15:26:48 +01:00
parent 72bcbcfef9
commit 90d8652438
12 changed files with 70 additions and 78 deletions

View File

@ -297,16 +297,14 @@ virConnectValidateURIPath(const char *uriPath,
if (STRNEQ(uriPath, "/system") && !compatSessionRoot) { if (STRNEQ(uriPath, "/system") && !compatSessionRoot) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected %s URI path '%s', try " _("unexpected %1$s URI path '%2$s', try %3$s:///system"),
"%s:///system"),
entityName, uriPath, entityName); entityName, uriPath, entityName);
return false; return false;
} }
} else { } else {
if (STRNEQ(uriPath, "/session")) { if (STRNEQ(uriPath, "/session")) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected %s URI path '%s', try " _("unexpected %1$s URI path '%2$s', try %3$s:///session"),
"%s:///session"),
entityName, uriPath, entityName); entityName, uriPath, entityName);
return false; return false;
} }

View File

@ -273,13 +273,13 @@
unsigned int __unsuppflags = flags & ~(supported); \ unsigned int __unsuppflags = flags & ~(supported); \
if (__uiflags != flags) { \ if (__uiflags != flags) { \
virReportInvalidArg(flags, \ virReportInvalidArg(flags, \
_("unsupported use of long flags in function %s"), \ _("unsupported use of long flags in function %1$s"), \
__FUNCTION__); \ __FUNCTION__); \
return retval; \ return retval; \
} \ } \
if (__unsuppflags) { \ if (__unsuppflags) { \
virReportInvalidArg(flags, \ virReportInvalidArg(flags, \
_("unsupported flags (0x%x) in function %s"), \ _("unsupported flags (0x%1$x) in function %2$s"), \
__unsuppflags, __FUNCTION__); \ __unsuppflags, __FUNCTION__); \
return retval; \ return retval; \
} \ } \
@ -302,13 +302,13 @@
unsigned int __unsuppflags = flags & ~(supported); \ unsigned int __unsuppflags = flags & ~(supported); \
if (__uiflags != flags) { \ if (__uiflags != flags) { \
virReportInvalidArg(flags, \ virReportInvalidArg(flags, \
_("unsupported use of long flags in function %s"), \ _("unsupported use of long flags in function %1$s"), \
__FUNCTION__); \ __FUNCTION__); \
goto label; \ goto label; \
} \ } \
if (__unsuppflags) { \ if (__unsuppflags) { \
virReportInvalidArg(flags, \ virReportInvalidArg(flags, \
_("unsupported flags (0x%x) in function %s"), \ _("unsupported flags (0x%1$x) in function %2$s"), \
__unsuppflags, __FUNCTION__); \ __unsuppflags, __FUNCTION__); \
goto label; \ goto label; \
} \ } \
@ -333,8 +333,7 @@
do { \ do { \
if ((flags & FLAG1) && (flags & FLAG2)) { \ if ((flags & FLAG1) && (flags & FLAG2)) { \
virReportInvalidArg(ctl, \ virReportInvalidArg(ctl, \
_("Flags '%s' and '%s' are mutually " \ _("Flags '%1$s' and '%2$s' are mutually exclusive"), \
"exclusive"), \
#FLAG1, #FLAG2); \ #FLAG1, #FLAG2); \
return RET; \ return RET; \
} \ } \
@ -357,8 +356,7 @@
do { \ do { \
if ((flags & FLAG1) && (flags & FLAG2)) { \ if ((flags & FLAG1) && (flags & FLAG2)) { \
virReportInvalidArg(ctl, \ virReportInvalidArg(ctl, \
_("Flags '%s' and '%s' are mutually " \ _("Flags '%1$s' and '%2$s' are mutually exclusive"), \
"exclusive"), \
#FLAG1, #FLAG2); \ #FLAG1, #FLAG2); \
goto LABEL; \ goto LABEL; \
} \ } \
@ -383,7 +381,7 @@
do { \ do { \
if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \ if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \
virReportInvalidArg(ctl, \ virReportInvalidArg(ctl, \
_("Flag '%s' is required by flag '%s'"), \ _("Flag '%1$s' is required by flag '%2$s'"), \
#FLAG2, #FLAG1); \ #FLAG2, #FLAG1); \
return RET; \ return RET; \
} \ } \
@ -405,7 +403,7 @@
do { \ do { \
if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \ if ((flags & (FLAG1)) && !(flags & (FLAG2))) { \
virReportInvalidArg(ctl, \ virReportInvalidArg(ctl, \
_("Flag '%s' is required by flag '%s'"), \ _("Flag '%1$s' is required by flag '%2$s'"), \
#FLAG2, #FLAG1); \ #FLAG2, #FLAG1); \
goto LABEL; \ goto LABEL; \
} \ } \
@ -481,7 +479,7 @@
#define virCheckReadOnlyGoto(flags, label) \ #define virCheckReadOnlyGoto(flags, label) \
do { \ do { \
if ((flags) & VIR_CONNECT_RO) { \ if ((flags) & VIR_CONNECT_RO) { \
virReportRestrictedError(_("read only access prevents %s"), \ virReportRestrictedError(_("read only access prevents %1$s"), \
__FUNCTION__); \ __FUNCTION__); \
goto label; \ goto label; \
} \ } \

View File

@ -1490,7 +1490,7 @@ virDomainCoreDumpWithFormat(virDomainPtr domain, const char *to,
virCheckNonNullArgGoto(to, error); virCheckNonNullArgGoto(to, error);
if (dumpformat >= VIR_DOMAIN_CORE_DUMP_FORMAT_LAST) { if (dumpformat >= VIR_DOMAIN_CORE_DUMP_FORMAT_LAST) {
virReportInvalidArg(flags, _("dumpformat '%d' is not supported"), virReportInvalidArg(flags, _("dumpformat '%1$d' is not supported"),
dumpformat); dumpformat);
goto error; goto error;
} }
@ -1569,7 +1569,7 @@ virDomainScreenshot(virDomainPtr domain,
if (domain->conn != stream->conn) { if (domain->conn != stream->conn) {
virReportInvalidArg(stream, virReportInvalidArg(stream,
_("stream must match connection of domain '%s'"), _("stream must match connection of domain '%1$s'"),
domain->name); domain->name);
goto error; goto error;
} }
@ -1991,7 +1991,7 @@ virDomainGetMaxMemory(virDomainPtr domain)
if (ret == 0) if (ret == 0)
goto error; goto error;
if ((unsigned long) ret != ret) { if ((unsigned long) ret != ret) {
virReportError(VIR_ERR_OVERFLOW, _("result too large: %llu"), virReportError(VIR_ERR_OVERFLOW, _("result too large: %1$llu"),
ret); ret);
goto error; goto error;
} }
@ -2040,7 +2040,7 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
virCheckNonZeroArgGoto(memory, error); virCheckNonZeroArgGoto(memory, error);
if (virMemoryMaxValue(true) / 1024 <= memory) { if (virMemoryMaxValue(true) / 1024 <= memory) {
virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"), virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"),
memory); memory);
goto error; goto error;
} }
@ -2095,7 +2095,7 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory)
virCheckNonZeroArgGoto(memory, error); virCheckNonZeroArgGoto(memory, error);
if (virMemoryMaxValue(true) / 1024 <= memory) { if (virMemoryMaxValue(true) / 1024 <= memory) {
virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"), virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"),
memory); memory);
goto error; goto error;
} }
@ -2160,7 +2160,7 @@ virDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory,
virCheckNonZeroArgGoto(memory, error); virCheckNonZeroArgGoto(memory, error);
if (virMemoryMaxValue(true) / 1024 <= memory) { if (virMemoryMaxValue(true) / 1024 <= memory) {
virReportError(VIR_ERR_OVERFLOW, _("input too large: %lu"), virReportError(VIR_ERR_OVERFLOW, _("input too large: %1$lu"),
memory); memory);
goto error; goto error;
} }
@ -5835,7 +5835,7 @@ virDomainBlockStats(virDomainPtr dom, const char *disk,
virCheckNonNullArgGoto(stats, error); virCheckNonNullArgGoto(stats, error);
if (size > sizeof(stats2)) { if (size > sizeof(stats2)) {
virReportInvalidArg(size, virReportInvalidArg(size,
_("size must not exceed %zu"), _("size must not exceed %1$zu"),
sizeof(stats2)); sizeof(stats2));
goto error; goto error;
} }
@ -5990,7 +5990,7 @@ virDomainInterfaceStats(virDomainPtr dom, const char *device,
virCheckNonNullArgGoto(stats, error); virCheckNonNullArgGoto(stats, error);
if (size > sizeof(stats2)) { if (size > sizeof(stats2)) {
virReportInvalidArg(size, virReportInvalidArg(size,
_("size must not exceed %zu"), _("size must not exceed %1$zu"),
sizeof(stats2)); sizeof(stats2));
goto error; goto error;
} }
@ -7358,14 +7358,14 @@ virDomainSendKey(virDomainPtr domain,
if (codeset >= VIR_KEYCODE_SET_LAST) { if (codeset >= VIR_KEYCODE_SET_LAST) {
virReportInvalidArg(codeset, virReportInvalidArg(codeset,
_("Unsupported codeset '%d'"), _("Unsupported codeset '%1$d'"),
codeset); codeset);
goto error; goto error;
} }
if (nkeycodes > VIR_DOMAIN_SEND_KEY_MAX_KEYS) { if (nkeycodes > VIR_DOMAIN_SEND_KEY_MAX_KEYS) {
virReportInvalidArg(nkeycodes, virReportInvalidArg(nkeycodes,
_("nkeycodes must be <= %d"), _("nkeycodes must be <= %1$d"),
VIR_DOMAIN_SEND_KEY_MAX_KEYS); VIR_DOMAIN_SEND_KEY_MAX_KEYS);
goto error; goto error;
} }
@ -7830,7 +7830,7 @@ virDomainGetVcpuPinInfo(virDomainPtr domain, int ncpumaps,
virCheckPositiveArgGoto(maplen, error); virCheckPositiveArgGoto(maplen, error);
if (VIR_INT_MULTIPLY_OVERFLOW(ncpumaps, maplen)) { 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); ncpumaps, maplen);
goto error; goto error;
} }
@ -8036,7 +8036,7 @@ virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
virCheckZeroArgGoto(maplen, error); virCheckZeroArgGoto(maplen, error);
if (cpumaps && VIR_INT_MULTIPLY_OVERFLOW(maxinfo, maplen)) { 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); maxinfo, maplen);
goto error; goto error;
} }
@ -9943,7 +9943,7 @@ virConnectDomainEventRegisterAny(virConnectPtr conn,
virCheckDomainGoto(dom, error); virCheckDomainGoto(dom, error);
if (dom->conn != conn) { if (dom->conn != conn) {
virReportInvalidArg(dom, virReportInvalidArg(dom,
_("domain '%s' must match connection"), _("domain '%1$s' must match connection"),
dom->name); dom->name);
goto error; goto error;
} }
@ -9952,7 +9952,7 @@ virConnectDomainEventRegisterAny(virConnectPtr conn,
virCheckNonNegativeArgGoto(eventID, error); virCheckNonNegativeArgGoto(eventID, error);
if (eventID >= VIR_DOMAIN_EVENT_ID_LAST) { if (eventID >= VIR_DOMAIN_EVENT_ID_LAST) {
virReportInvalidArg(eventID, virReportInvalidArg(eventID,
_("eventID must be less than %d"), _("eventID must be less than %1$d"),
VIR_DOMAIN_EVENT_ID_LAST); VIR_DOMAIN_EVENT_ID_LAST);
goto error; goto error;
} }
@ -10328,7 +10328,7 @@ virDomainOpenConsole(virDomainPtr dom,
if (conn != st->conn) { if (conn != st->conn) {
virReportInvalidArg(st, virReportInvalidArg(st,
_("stream must match connection of domain '%s'"), _("stream must match connection of domain '%1$s'"),
dom->name); dom->name);
goto error; goto error;
} }
@ -10394,7 +10394,7 @@ virDomainOpenChannel(virDomainPtr dom,
if (conn != st->conn) { if (conn != st->conn) {
virReportInvalidArg(st, virReportInvalidArg(st,
_("stream must match connection of domain '%s'"), _("stream must match connection of domain '%1$s'"),
dom->name); dom->name);
goto error; goto error;
} }
@ -11295,14 +11295,14 @@ virDomainOpenGraphics(virDomainPtr dom,
if (fstat(fd, &sb) < 0) { if (fstat(fd, &sb) < 0) {
virReportSystemError(errno, virReportSystemError(errno,
_("Unable to access file descriptor %d"), fd); _("Unable to access file descriptor %1$d"), fd);
goto error; goto error;
} }
#ifndef WIN32 #ifndef WIN32
if (!S_ISSOCK(sb.st_mode)) { if (!S_ISSOCK(sb.st_mode)) {
virReportInvalidArg(fd, virReportInvalidArg(fd,
_("fd %d must be a socket"), _("fd %1$d must be a socket"),
fd); fd);
goto error; goto error;
} }
@ -11672,7 +11672,7 @@ virDomainGetCPUStats(virDomainPtr domain,
virCheckNullArgGoto(params, error); virCheckNullArgGoto(params, error);
if (nparams && ncpus > UINT_MAX / nparams) { 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); nparams, ncpus);
goto error; goto error;
} }
@ -12673,7 +12673,7 @@ virDomainListGetStats(virDomainPtr *doms,
if (!*doms) { if (!*doms) {
virReportError(VIR_ERR_INVALID_ARG, 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__); __FUNCTION__);
goto cleanup; goto cleanup;
} }
@ -13381,13 +13381,13 @@ int virDomainSetLifecycleAction(virDomainPtr domain,
if (type >= VIR_DOMAIN_LIFECYCLE_LAST) { if (type >= VIR_DOMAIN_LIFECYCLE_LAST) {
virReportError(VIR_ERR_INVALID_ARG, virReportError(VIR_ERR_INVALID_ARG,
_("invalid lifecycle type '%u'"), type); _("invalid lifecycle type '%1$u'"), type);
goto error; goto error;
} }
if (action >= VIR_DOMAIN_LIFECYCLE_ACTION_LAST) { if (action >= VIR_DOMAIN_LIFECYCLE_ACTION_LAST) {
virReportError(VIR_ERR_INVALID_ARG, virReportError(VIR_ERR_INVALID_ARG,
_("invalid lifecycle action '%u'"), action); _("invalid lifecycle action '%1$u'"), action);
goto error; goto error;
} }

View File

@ -565,8 +565,7 @@ virNodeGetCPUStats(virConnectPtr conn,
virCheckNonNegativeArgGoto(*nparams, error); virCheckNonNegativeArgGoto(*nparams, error);
if (cpuNum < 0 && cpuNum != VIR_NODE_CPU_STATS_ALL_CPUS) { if (cpuNum < 0 && cpuNum != VIR_NODE_CPU_STATS_ALL_CPUS) {
virReportInvalidArg(cpuNum, virReportInvalidArg(cpuNum,
_("cpuNum in %s only accepts %d as a negative " _("cpuNum in %1$s only accepts %2$d as a negative value"),
"value"),
__FUNCTION__, VIR_NODE_CPU_STATS_ALL_CPUS); __FUNCTION__, VIR_NODE_CPU_STATS_ALL_CPUS);
goto error; goto error;
} }
@ -654,8 +653,7 @@ virNodeGetMemoryStats(virConnectPtr conn,
virCheckNonNegativeArgGoto(*nparams, error); virCheckNonNegativeArgGoto(*nparams, error);
if (cellNum < 0 && cellNum != VIR_NODE_MEMORY_STATS_ALL_CELLS) { if (cellNum < 0 && cellNum != VIR_NODE_MEMORY_STATS_ALL_CELLS) {
virReportInvalidArg(cpuNum, virReportInvalidArg(cpuNum,
_("cellNum in %s only accepts %d as a negative " _("cellNum in %1$s only accepts %2$d as a negative value"),
"value"),
__FUNCTION__, VIR_NODE_MEMORY_STATS_ALL_CELLS); __FUNCTION__, VIR_NODE_MEMORY_STATS_ALL_CELLS);
goto error; goto error;
} }

View File

@ -215,15 +215,14 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr model,
if (getcon(&ctx) < 0) { if (getcon(&ctx) < 0) {
virReportSystemError(errno, virReportSystemError(errno,
_("unable to get PID %d security context"), _("unable to get PID %1$d security context"),
getpid()); getpid());
goto error; goto error;
} }
if (virStrcpy(oldlabel->label, ctx, VIR_SECURITY_LABEL_BUFLEN) < 0) { if (virStrcpy(oldlabel->label, ctx, VIR_SECURITY_LABEL_BUFLEN) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("security label exceeds " _("security label exceeds maximum length: %1$d"),
"maximum length: %d"),
VIR_SECURITY_LABEL_BUFLEN - 1); VIR_SECURITY_LABEL_BUFLEN - 1);
freecon(ctx); freecon(ctx);
goto error; goto error;
@ -239,7 +238,7 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr model,
if (setexeccon(label->label) < 0) { if (setexeccon(label->label) < 0) {
virReportSystemError(errno, virReportSystemError(errno,
_("Cannot set context %s"), _("Cannot set context %1$s"),
label->label); label->label);
goto error; goto error;
} }
@ -251,7 +250,7 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr model,
} else if (STREQ(model->model, "apparmor")) { } else if (STREQ(model->model, "apparmor")) {
#ifdef WITH_APPARMOR #ifdef WITH_APPARMOR
if (aa_change_profile(label->label) < 0) { if (aa_change_profile(label->label) < 0) {
virReportSystemError(errno, _("error changing profile to %s"), virReportSystemError(errno, _("error changing profile to %1$s"),
label->label); label->label);
goto error; goto error;
} }
@ -264,7 +263,7 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr model,
/* nothing todo */ /* nothing todo */
} else { } else {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
_("Security model %s cannot be entered"), _("Security model %1$s cannot be entered"),
model->model); model->model);
goto error; goto error;
} }

View File

@ -392,7 +392,7 @@ virNetworkLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
if (virUUIDParse(uuidstr, uuid) < 0) { if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr, virReportInvalidArg(uuidstr,
_("uuidstr in %s must be a valid UUID"), _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__); __FUNCTION__);
goto error; goto error;
} }
@ -1211,7 +1211,7 @@ virConnectNetworkEventRegisterAny(virConnectPtr conn,
virCheckNetworkGoto(net, error); virCheckNetworkGoto(net, error);
if (net->conn != conn) { if (net->conn != conn) {
virReportInvalidArg(net, virReportInvalidArg(net,
_("network '%s' in %s must match connection"), _("network '%1$s' in %2$s must match connection"),
net->name, __FUNCTION__); net->name, __FUNCTION__);
goto error; goto error;
} }
@ -1221,7 +1221,7 @@ virConnectNetworkEventRegisterAny(virConnectPtr conn,
if (eventID >= VIR_NETWORK_EVENT_ID_LAST) { if (eventID >= VIR_NETWORK_EVENT_ID_LAST) {
virReportInvalidArg(eventID, 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); __FUNCTION__, VIR_NETWORK_EVENT_ID_LAST);
goto error; goto error;
} }
@ -1485,7 +1485,7 @@ virNetworkPortLookupByUUIDString(virNetworkPtr net,
if (virUUIDParse(uuidstr, uuid) < 0) { if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr, virReportInvalidArg(uuidstr,
_("uuidstr in %s must be a valid UUID"), _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__); __FUNCTION__);
goto error; goto error;
} }

View File

@ -952,7 +952,7 @@ virConnectNodeDeviceEventRegisterAny(virConnectPtr conn,
virCheckNodeDeviceGoto(dev, error); virCheckNodeDeviceGoto(dev, error);
if (dev->conn != conn) { if (dev->conn != conn) {
virReportInvalidArg(dev, virReportInvalidArg(dev,
_("node device '%s' in %s must match connection"), _("node device '%1$s' in %2$s must match connection"),
dev->name, __FUNCTION__); dev->name, __FUNCTION__);
goto error; goto error;
} }
@ -962,7 +962,7 @@ virConnectNodeDeviceEventRegisterAny(virConnectPtr conn,
if (eventID >= VIR_NODE_DEVICE_EVENT_ID_LAST) { if (eventID >= VIR_NODE_DEVICE_EVENT_ID_LAST) {
virReportInvalidArg(eventID, 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); __FUNCTION__, VIR_NODE_DEVICE_EVENT_ID_LAST);
goto error; goto error;
} }

View File

@ -265,7 +265,7 @@ virNWFilterLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
if (virUUIDParse(uuidstr, uuid) < 0) { if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr, virReportInvalidArg(uuidstr,
_("uuidstr in %s must be a valid UUID"), _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__); __FUNCTION__);
goto error; goto error;
} }

View File

@ -236,7 +236,7 @@ virDomainQemuAttach(virConnectPtr conn,
virCheckNonZeroArgGoto(pid_value, error); virCheckNonZeroArgGoto(pid_value, error);
if (pid != pid_value) { if (pid != pid_value) {
virReportInvalidArg(pid_value, virReportInvalidArg(pid_value,
_("pid_value in %s is too large"), _("pid_value in %1$s is too large"),
__FUNCTION__); __FUNCTION__);
goto error; goto error;
} }
@ -380,7 +380,7 @@ virConnectDomainQemuMonitorEventRegister(virConnectPtr conn,
virCheckDomainGoto(dom, error); virCheckDomainGoto(dom, error);
if (dom->conn != conn) { if (dom->conn != conn) {
virReportInvalidArg(dom, virReportInvalidArg(dom,
_("domain '%s' in %s must match connection"), _("domain '%1$s' in %2$s must match connection"),
dom->name, __FUNCTION__); dom->name, __FUNCTION__);
goto error; goto error;
} }

View File

@ -269,7 +269,7 @@ virSecretLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
if (virUUIDParse(uuidstr, uuid) < 0) { if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr, virReportInvalidArg(uuidstr,
_("uuidstr in %s must be a valid UUID"), _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__); __FUNCTION__);
goto error; goto error;
} }
@ -787,7 +787,7 @@ virConnectSecretEventRegisterAny(virConnectPtr conn,
char uuidstr[VIR_UUID_STRING_BUFLEN]; char uuidstr[VIR_UUID_STRING_BUFLEN];
virUUIDFormat(secret->uuid, uuidstr); virUUIDFormat(secret->uuid, uuidstr);
virReportInvalidArg(secret, virReportInvalidArg(secret,
_("secret '%s' in %s must match connection"), _("secret '%1$s' in %2$s must match connection"),
uuidstr, __FUNCTION__); uuidstr, __FUNCTION__);
goto error; goto error;
} }
@ -797,7 +797,7 @@ virConnectSecretEventRegisterAny(virConnectPtr conn,
if (eventID >= VIR_SECRET_EVENT_ID_LAST) { if (eventID >= VIR_SECRET_EVENT_ID_LAST) {
virReportInvalidArg(eventID, 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); __FUNCTION__, VIR_SECRET_EVENT_ID_LAST);
goto error; goto error;
} }

View File

@ -474,7 +474,7 @@ virStoragePoolLookupByUUIDString(virConnectPtr conn,
if (virUUIDParse(uuidstr, uuid) < 0) { if (virUUIDParse(uuidstr, uuid) < 0) {
virReportInvalidArg(uuidstr, virReportInvalidArg(uuidstr,
_("uuidstr in %s must be a valid UUID"), _("uuidstr in %1$s must be a valid UUID"),
__FUNCTION__); __FUNCTION__);
goto error; goto error;
} }
@ -1713,7 +1713,7 @@ virStorageVolDownload(virStorageVolPtr vol,
if (vol->conn != stream->conn) { if (vol->conn != stream->conn) {
virReportInvalidArg(stream, 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); __FUNCTION__, vol->name);
goto error; goto error;
} }
@ -1798,7 +1798,7 @@ virStorageVolUpload(virStorageVolPtr vol,
if (vol->conn != stream->conn) { if (vol->conn != stream->conn) {
virReportInvalidArg(stream, 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); __FUNCTION__, vol->name);
goto error; goto error;
} }
@ -2258,8 +2258,7 @@ virStorageVolResize(virStorageVolPtr vol,
if (capacity == 0 && !((flags & VIR_STORAGE_VOL_RESIZE_DELTA) || if (capacity == 0 && !((flags & VIR_STORAGE_VOL_RESIZE_DELTA) ||
(flags & VIR_STORAGE_VOL_RESIZE_SHRINK))) { (flags & VIR_STORAGE_VOL_RESIZE_SHRINK))) {
virReportInvalidArg(capacity, virReportInvalidArg(capacity,
_("capacity in %s cannot be zero without 'delta' " _("capacity in %1$s cannot be zero without 'delta' or 'shrink' flags set"),
"or 'shrink' flags set"),
__FUNCTION__); __FUNCTION__);
goto error; goto error;
} }
@ -2403,7 +2402,7 @@ virConnectStoragePoolEventRegisterAny(virConnectPtr conn,
virCheckStoragePoolGoto(pool, error); virCheckStoragePoolGoto(pool, error);
if (pool->conn != conn) { if (pool->conn != conn) {
virReportInvalidArg(pool, virReportInvalidArg(pool,
_("storage pool '%s' in %s must match connection"), _("storage pool '%1$s' in %2$s must match connection"),
pool->name, __FUNCTION__); pool->name, __FUNCTION__);
goto error; goto error;
} }
@ -2413,7 +2412,7 @@ virConnectStoragePoolEventRegisterAny(virConnectPtr conn,
if (eventID >= VIR_STORAGE_POOL_EVENT_ID_LAST) { if (eventID >= VIR_STORAGE_POOL_EVENT_ID_LAST) {
virReportInvalidArg(eventID, 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); __FUNCTION__, VIR_STORAGE_POOL_EVENT_ID_LAST);
goto error; goto error;
} }

View File

@ -519,7 +519,7 @@ virRegisterConnectDriver(virConnectDriver *driver,
virCheckNonNullArgReturn(driver, -1); virCheckNonNullArgReturn(driver, -1);
if (virConnectDriverTabCount >= MAX_DRIVERS) { if (virConnectDriverTabCount >= MAX_DRIVERS) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Too many drivers, cannot register %s"), _("Too many drivers, cannot register %1$s"),
driver->hypervisorDriver->name); driver->hypervisorDriver->name);
return -1; return -1;
} }
@ -589,7 +589,7 @@ virRegisterStateDriver(virStateDriver *driver)
if (virStateDriverTabCount >= MAX_DRIVERS) { if (virStateDriverTabCount >= MAX_DRIVERS) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Too many drivers, cannot register %s"), _("Too many drivers, cannot register %1$s"),
driver->name); driver->name);
return -1; return -1;
} }
@ -657,13 +657,13 @@ virStateInitialize(bool privileged,
opaque); opaque);
VIR_DEBUG("State init result %d (mandatory=%d)", ret, mandatory); VIR_DEBUG("State init result %d (mandatory=%d)", ret, mandatory);
if (ret == VIR_DRV_STATE_INIT_ERROR) { 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, virStateDriverTab[i]->name,
virGetLastErrorMessage()); virGetLastErrorMessage());
return -1; return -1;
} }
if (ret == VIR_DRV_STATE_INIT_SKIPPED && mandatory) { 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); virStateDriverTab[i]->name);
return -1; return -1;
} }
@ -869,7 +869,7 @@ virConnectCheckURIMissingSlash(const char *uristr, virURI *uri)
if (STREQ(uri->server, "session") || if (STREQ(uri->server, "session") ||
STREQ(uri->server, "system")) { STREQ(uri->server, "system")) {
virReportError(VIR_ERR_INTERNAL_ERROR, 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); uristr, uri->scheme, uri->server);
return -1; return -1;
} }
@ -968,7 +968,7 @@ virConnectOpenInternal(const char *name,
if (ret->uri->scheme == NULL) { if (ret->uri->scheme == NULL) {
virReportError(VIR_ERR_NO_CONNECT, virReportError(VIR_ERR_NO_CONNECT,
_("URI '%s' does not include a driver name"), _("URI '%1$s' does not include a driver name"),
name); name);
return NULL; return NULL;
} }
@ -986,7 +986,7 @@ virConnectOpenInternal(const char *name,
if (strspn(ret->uri->scheme, "abcdefghijklmnopqrstuvwxyz") != if (strspn(ret->uri->scheme, "abcdefghijklmnopqrstuvwxyz") !=
strlen(ret->uri->scheme)) { strlen(ret->uri->scheme)) {
virReportError(VIR_ERR_NO_CONNECT, 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); ret->uri->scheme);
return NULL; return NULL;
} }
@ -1056,7 +1056,7 @@ virConnectOpenInternal(const char *name,
false)) { false)) {
virReportErrorHelper(VIR_FROM_NONE, VIR_ERR_CONFIG_UNSUPPORTED, virReportErrorHelper(VIR_FROM_NONE, VIR_ERR_CONFIG_UNSUPPORTED,
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
_("libvirt was built without the '%s' driver"), _("libvirt was built without the '%1$s' driver"),
ret->uri->scheme); ret->uri->scheme);
return NULL; return NULL;
} }
@ -1106,7 +1106,7 @@ virConnectOpenInternal(const char *name,
if (embed && !virConnectDriverTab[i]->embeddable) { if (embed && !virConnectDriverTab[i]->embeddable) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, 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); virConnectDriverTab[i]->hypervisorDriver->name);
return NULL; return NULL;
} }
@ -1341,7 +1341,7 @@ virTypedParameterValidateSet(virConnectPtr conn,
if (strnlen(params[i].field, VIR_TYPED_PARAM_FIELD_LENGTH) == if (strnlen(params[i].field, VIR_TYPED_PARAM_FIELD_LENGTH) ==
VIR_TYPED_PARAM_FIELD_LENGTH) { VIR_TYPED_PARAM_FIELD_LENGTH) {
virReportInvalidArg(params, virReportInvalidArg(params,
_("string parameter name '%.*s' too long"), _("string parameter name '%2$.*1$s' too long"),
VIR_TYPED_PARAM_FIELD_LENGTH, VIR_TYPED_PARAM_FIELD_LENGTH,
params[i].field); params[i].field);
return -1; return -1;
@ -1350,13 +1350,13 @@ virTypedParameterValidateSet(virConnectPtr conn,
if (string_okay) { if (string_okay) {
if (!params[i].value.s) { if (!params[i].value.s) {
virReportInvalidArg(params, virReportInvalidArg(params,
_("NULL string parameter '%s'"), _("NULL string parameter '%1$s'"),
params[i].field); params[i].field);
return -1; return -1;
} }
} else { } else {
virReportInvalidArg(params, virReportInvalidArg(params,
_("string parameter '%s' unsupported"), _("string parameter '%1$s' unsupported"),
params[i].field); params[i].field);
return -1; return -1;
} }