}
if (virStrToLong_i(config->unix_sock_ro_perms, NULL, 8, &unix_sock_ro_mask) != 0) {
- VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_ro_perms);
+ VIR_ERROR(_("Failed to parse mode '%1$s'"), config->unix_sock_ro_perms);
return -1;
}
if (virStrToLong_i(config->unix_sock_admin_perms, NULL, 8, &unix_sock_adm_mask) != 0) {
- VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_admin_perms);
+ VIR_ERROR(_("Failed to parse mode '%1$s'"), config->unix_sock_admin_perms);
return -1;
}
if (virStrToLong_i(config->unix_sock_rw_perms, NULL, 8, &unix_sock_rw_mask) != 0) {
- VIR_ERROR(_("Failed to parse mode '%s'"), config->unix_sock_rw_perms);
+ VIR_ERROR(_("Failed to parse mode '%1$s'"), config->unix_sock_rw_perms);
return -1;
}
return 0;
} else if (STREQ(config->host_uuid_source, "machine-id")) {
if (virFileReadBufQuiet(machine_id, buf, sizeof(buf)) < 0) {
- VIR_ERROR(_("Can't read %s"), machine_id);
+ VIR_ERROR(_("Can't read %1$s"), machine_id);
return -1;
}
uuid = buf;
} else {
- VIR_ERROR(_("invalid UUID source: %s"), config->host_uuid_source);
+ VIR_ERROR(_("invalid UUID source: %1$s"), config->host_uuid_source);
return -1;
}
if (virSetHostUUIDStr(uuid)) {
- VIR_ERROR(_("invalid host UUID: %s"), uuid);
+ VIR_ERROR(_("invalid host UUID: %1$s"), uuid);
return -1;
}
/* Read the config file if it exists */
if (remote_config_file &&
daemonConfigLoadFile(config, remote_config_file, implicit_conf) < 0) {
- VIR_ERROR(_("Can't load config file: %s: %s"),
+ VIR_ERROR(_("Can't load config file: %1$s: %2$s"),
virGetLastErrorMessage(), remote_config_file);
exit(EXIT_FAILURE);
}
if (godaemon) {
if (chdir("/") < 0) {
- VIR_ERROR(_("cannot change to root directory: %s"),
+ VIR_ERROR(_("cannot change to root directory: %1$s"),
g_strerror(errno));
goto cleanup;
}
if ((statuswrite = virDaemonForkIntoBackground(argv[0])) < 0) {
- VIR_ERROR(_("Failed to fork as daemon: %s"),
+ VIR_ERROR(_("Failed to fork as daemon: %1$s"),
g_strerror(errno));
goto cleanup;
}
old_umask = umask(077);
VIR_DEBUG("Ensuring run dir '%s' exists", run_dir);
if (g_mkdir_with_parents(run_dir, 0777) < 0) {
- VIR_ERROR(_("unable to create rundir %s: %s"), run_dir,
+ VIR_ERROR(_("unable to create rundir %1$s: %2$s"), run_dir,
g_strerror(errno));
ret = VIR_DAEMON_ERR_RUNDIR;
goto cleanup;
*auth = VIR_NET_SERVER_SERVICE_AUTH_POLKIT;
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("%s: %s: unsupported auth %s"),
+ _("%1$s: %2$s: unsupported auth %3$s"),
filename, key, authstr);
VIR_FREE(authstr);
return -1;
return -1;
} else if (rc > 0 && data->tcp_min_ssf < SSF_WARNING_LEVEL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("minimum SSF levels lower than %d are not supported"),
+ _("minimum SSF levels lower than %1$d are not supported"),
SSF_WARNING_LEVEL);
return -1;
}
do { \
if ((_from) != (_type)(_from)) { \
virReportError(VIR_ERR_OVERFLOW, \
- _("conversion from hyper to %s overflowed"), \
+ _("conversion from hyper to %1$s overflowed"), \
#_type); \
goto cleanup; \
} \
priv->secretURI = "secret:///session";
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected driver type '%s' opened"), type);
+ _("Unexpected driver type '%1$s' opened"), type);
goto cleanup;
}
#else /* !MODULE_NAME */
if (ninfo > REMOTE_IOTHREAD_INFO_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many IOThreads in info: %d for limit %d"),
+ _("Too many IOThreads in info: %1$d for limit %2$d"),
ninfo, REMOTE_IOTHREAD_INFO_MAX);
goto cleanup;
}
VIR_DEBUG("negotiated an SSF of %d", ssf);
if (ssf < 56) { /* 56 is good for Kerberos */
- VIR_ERROR(_("negotiated SSF %d was not strong enough"), ssf);
+ VIR_ERROR(_("negotiated SSF %1$d was not strong enough"), ssf);
return -2;
}
}
goto authfail;
if (serveroutlen > REMOTE_AUTH_SASL_DATA_MAX) {
- VIR_ERROR(_("sasl start reply data too long %d"), (int)serveroutlen);
+ VIR_ERROR(_("sasl start reply data too long %1$d"), (int)serveroutlen);
goto authfail;
}
goto authfail;
if (serveroutlen > REMOTE_AUTH_SASL_DATA_MAX) {
- VIR_ERROR(_("sasl step reply data too long %d"),
+ VIR_ERROR(_("sasl step reply data too long %1$d"),
(int)serveroutlen);
goto authfail;
}
if (callbackID < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("domain event %d not registered"),
+ _("domain event %1$d not registered"),
VIR_DOMAIN_EVENT_ID_LIFECYCLE);
goto cleanup;
}
* modern callback style of RPC. */
if (args->eventID > VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED ||
args->eventID < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %1$d"),
args->eventID);
goto cleanup;
}
goto cleanup;
if (args->eventID >= VIR_DOMAIN_EVENT_ID_LAST || args->eventID < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %1$d"),
args->eventID);
goto cleanup;
}
* modern callback style of RPC. */
if (args->eventID > VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED ||
args->eventID < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"),
+ virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %1$d"),
args->eventID);
goto cleanup;
}
}
if (callbackID < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("domain event %d not registered"), args->eventID);
+ _("domain event %1$d not registered"), args->eventID);
goto cleanup;
}
}
if (i == priv->ndomainEventCallbacks) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("domain event callback %d not registered"),
+ _("domain event callback %1$d not registered"),
args->callbackID);
goto cleanup;
}
if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many migration parameters '%d' for limit '%d'"),
+ _("Too many migration parameters '%1$d' for limit '%2$d'"),
args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX);
goto cleanup;
}
if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many migration parameters '%d' for limit '%d'"),
+ _("Too many migration parameters '%1$d' for limit '%2$d'"),
args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX);
goto cleanup;
}
if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many migration parameters '%d' for limit '%d'"),
+ _("Too many migration parameters '%1$d' for limit '%2$d'"),
args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX);
goto cleanup;
}
if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many migration parameters '%d' for limit '%d'"),
+ _("Too many migration parameters '%1$d' for limit '%2$d'"),
args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX);
goto cleanup;
}
if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many migration parameters '%d' for limit '%d'"),
+ _("Too many migration parameters '%1$d' for limit '%2$d'"),
args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX);
goto cleanup;
}
if (args->params.params_len > REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many migration parameters '%d' for limit '%d'"),
+ _("Too many migration parameters '%1$d' for limit '%2$d'"),
args->params.params_len, REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX);
goto cleanup;
}
if (len > REMOTE_CONNECT_CPU_MODELS_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many CPU models '%d' for limit '%d'"),
+ _("Too many CPU models '%1$d' for limit '%2$d'"),
len, REMOTE_CONNECT_CPU_MODELS_MAX);
goto cleanup;
}
if (args->eventID >= VIR_NETWORK_EVENT_ID_LAST || args->eventID < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unsupported network event ID %d"), args->eventID);
+ _("unsupported network event ID %1$d"), args->eventID);
goto cleanup;
}
}
if (i == priv->nnetworkEventCallbacks) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("network event callback %d not registered"),
+ _("network event callback %1$d not registered"),
args->callbackID);
goto cleanup;
}
if (args->eventID >= VIR_STORAGE_POOL_EVENT_ID_LAST || args->eventID < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unsupported storage pool event ID %d"), args->eventID);
+ _("unsupported storage pool event ID %1$d"), args->eventID);
goto cleanup;
}
}
if (i == priv->nstorageEventCallbacks) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("storage pool event callback %d not registered"),
+ _("storage pool event callback %1$d not registered"),
args->callbackID);
goto cleanup;
}
if (args->eventID >= VIR_NODE_DEVICE_EVENT_ID_LAST || args->eventID < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unsupported node device event ID %d"), args->eventID);
+ _("unsupported node device event ID %1$d"), args->eventID);
goto cleanup;
}
}
if (i == priv->nnodeDeviceEventCallbacks) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("node device event callback %d not registered"),
+ _("node device event callback %1$d not registered"),
args->callbackID);
goto cleanup;
}
if (args->eventID >= VIR_SECRET_EVENT_ID_LAST || args->eventID < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unsupported secret event ID %d"), args->eventID);
+ _("unsupported secret event ID %1$d"), args->eventID);
goto cleanup;
}
}
if (i == priv->nsecretEventCallbacks) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("node device event callback %d not registered"),
+ _("node device event callback %1$d not registered"),
args->callbackID);
goto cleanup;
}
}
if (i == priv->nqemuEventCallbacks) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("qemu monitor event callback %d not registered"),
+ _("qemu monitor event callback %1$d not registered"),
args->callbackID);
goto cleanup;
}
if (nleases > REMOTE_NETWORK_DHCP_LEASES_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of leases is %d, which exceeds max limit: %d"),
+ _("Number of leases is %1$d, which exceeds max limit: %2$d"),
nleases, REMOTE_NETWORK_DHCP_LEASES_MAX);
goto cleanup;
}
if (nrecords) {
if (nrecords > REMOTE_DOMAIN_LIST_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of domain stats records is %d, "
- "which exceeds max limit: %d"),
+ _("Number of domain stats records is %1$d, which exceeds max limit: %2$d"),
nrecords, REMOTE_DOMAIN_LIST_MAX);
goto cleanup;
}
if (ninfo > REMOTE_DOMAIN_FSINFO_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many mountpoints in fsinfo: %d for limit %d"),
+ _("Too many mountpoints in fsinfo: %1$d for limit %2$d"),
ninfo, REMOTE_DOMAIN_FSINFO_MAX);
goto cleanup;
}
ndisk = info[i]->ndevAlias;
if (ndisk > REMOTE_DOMAIN_FSINFO_DISKS_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many disks in fsinfo: %zd for limit %d"),
+ _("Too many disks in fsinfo: %1$zd for limit %2$d"),
ndisk, REMOTE_DOMAIN_FSINFO_DISKS_MAX);
goto cleanup;
}
if (ifaces_count > REMOTE_DOMAIN_INTERFACE_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of interfaces, %d exceeds the max limit: %d"),
+ _("Number of interfaces, %1$d exceeds the max limit: %2$d"),
ifaces_count, REMOTE_DOMAIN_INTERFACE_MAX);
return -1;
}
if (iface->naddrs > REMOTE_DOMAIN_IP_ADDR_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of interfaces, %d exceeds the max limit: %d"),
+ _("Number of interfaces, %1$d exceeds the max limit: %2$d"),
iface->naddrs, REMOTE_DOMAIN_IP_ADDR_MAX);
goto cleanup;
}
if (nkeys > REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of keys %d, which exceeds max limit: %d"),
+ _("Number of keys %1$d, which exceeds max limit: %2$d"),
nkeys, REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX);
goto cleanup;
}
if (args->keys.keys_len > REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of keys %d, which exceeds max limit: %d"),
+ _("Number of keys %1$d, which exceeds max limit: %2$d"),
args->keys.keys_len, REMOTE_DOMAIN_AUTHORIZED_SSH_KEYS_MAX);
goto cleanup;
}
if (nmsgs > REMOTE_DOMAIN_MESSAGES_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of msgs %d, which exceeds max limit: %d"),
+ _("Number of msgs %1$d, which exceeds max limit: %2$d"),
nmsgs, REMOTE_DOMAIN_MESSAGES_MAX);
goto cleanup;
}
raise_error = (ret < 0);
} else {
virReportError(VIR_ERR_RPC,
- _("stream aborted with unexpected status %d"),
+ _("stream aborted with unexpected status %1$d"),
msg->header.status);
raise_error = true;
}
}
} else {
virReportError(VIR_ERR_RPC,
- _("Unexpected message type: %d"),
+ _("Unexpected message type: %1$d"),
msg->header.type);
ret = -1;
}
do { \
if ((_from) != (_type)(_from)) { \
virReportError(VIR_ERR_INTERNAL_ERROR, \
- _("conversion from hyper to %s overflowed"), #_type); \
+ _("conversion from hyper to %1$s overflowed"), #_type); \
goto done; \
} \
(_to) = (_from); \
int tmp; \
if (virStrToLong_i(var->value, NULL, 10, &tmp) < 0) { \
virReportError(VIR_ERR_INVALID_ARG, \
- _("Failed to parse value of URI component %s"), \
+ _("Failed to parse value of URI component %1$s"), \
var->name); \
goto error; \
} \
if (mode_str) {
if ((mode = remoteDriverModeTypeFromString(mode_str)) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Unknown remote mode '%s'"), mode_str);
+ _("Unknown remote mode '%1$s'"), mode_str);
goto error;
}
} else {
if (proxy_str) {
if ((proxy = virNetClientProxyTypeFromString(proxy_str)) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Unnkown proxy type '%s'"), proxy_str);
+ _("Unnkown proxy type '%1$s'"), proxy_str);
goto error;
}
} else {
for (i = 0; i < *nparams; ++i) {
if (virStrcpyStatic(params[i].field, ret.params.params_val[i].field) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Stats %s too big for destination"),
+ _("Stats %1$s too big for destination"),
ret.params.params_val[i].field);
goto cleanup;
}
for (i = 0; i < *nparams; ++i) {
if (virStrcpyStatic(params[i].field, ret.params.params_val[i].field) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Stats %s too big for destination"),
+ _("Stats %1$s too big for destination"),
ret.params.params_val[i].field);
goto cleanup;
}
if (maxCells > REMOTE_NODE_MAX_CELLS) {
virReportError(VIR_ERR_RPC,
- _("too many NUMA cells: %d > %d"),
+ _("too many NUMA cells: %1$d > %2$d"),
maxCells, REMOTE_NODE_MAX_CELLS);
return -1;
}
if (maxids > REMOTE_DOMAIN_LIST_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many domains '%d' for limit '%d'"),
+ _("Too many domains '%1$d' for limit '%2$d'"),
maxids, REMOTE_DOMAIN_LIST_MAX);
return -1;
}
if (ret.ids.ids_len > maxids) {
virReportError(VIR_ERR_RPC,
- _("Too many domains '%d' for limit '%d'"),
+ _("Too many domains '%1$d' for limit '%2$d'"),
ret.ids.ids_len, maxids);
goto cleanup;
}
if (ncpumaps > REMOTE_VCPUINFO_MAX) {
virReportError(VIR_ERR_RPC,
- _("vCPU count exceeds maximum: %d > %d"),
+ _("vCPU count exceeds maximum: %1$d > %2$d"),
ncpumaps, REMOTE_VCPUINFO_MAX);
return -1;
}
if (VIR_INT_MULTIPLY_OVERFLOW(ncpumaps, maplen) ||
ncpumaps * maplen > REMOTE_CPUMAPS_MAX) {
virReportError(VIR_ERR_RPC,
- _("vCPU map buffer length exceeds maximum: %d > %d"),
+ _("vCPU map buffer length exceeds maximum: %1$d > %2$d"),
ncpumaps * maplen, REMOTE_CPUMAPS_MAX);
return -1;
}
if (ret.num > ncpumaps) {
virReportError(VIR_ERR_RPC,
- _("host reports too many vCPUs: %d > %d"),
+ _("host reports too many vCPUs: %1$d > %2$d"),
ret.num, ncpumaps);
goto cleanup;
}
if (ret.cpumaps.cpumaps_len > ncpumaps * maplen) {
virReportError(VIR_ERR_RPC,
- _("host reports map buffer length exceeds maximum: %d > %d"),
+ _("host reports map buffer length exceeds maximum: %1$d > %2$d"),
ret.cpumaps.cpumaps_len, ncpumaps * maplen);
goto cleanup;
}
if (cpumaplen > REMOTE_CPUMAP_MAX) {
virReportError(VIR_ERR_RPC,
- _("%s length greater than maximum: %d > %d"),
+ _("%1$s length greater than maximum: %2$d > %3$d"),
"cpumap", cpumaplen, REMOTE_CPUMAP_MAX);
return -1;
}
/* There is only one cpumap for all emulator threads */
if (maplen > REMOTE_CPUMAPS_MAX) {
virReportError(VIR_ERR_RPC,
- _("vCPU map buffer length exceeds maximum: %d > %d"),
+ _("vCPU map buffer length exceeds maximum: %1$d > %2$d"),
maplen, REMOTE_CPUMAPS_MAX);
return -1;
}
if (ret.cpumaps.cpumaps_len > maplen) {
virReportError(VIR_ERR_RPC,
- _("host reports map buffer length exceeds maximum: %d > %d"),
+ _("host reports map buffer length exceeds maximum: %1$d > %2$d"),
ret.cpumaps.cpumaps_len, maplen);
goto cleanup;
}
if (maxinfo > REMOTE_VCPUINFO_MAX) {
virReportError(VIR_ERR_RPC,
- _("vCPU count exceeds maximum: %d > %d"),
+ _("vCPU count exceeds maximum: %1$d > %2$d"),
maxinfo, REMOTE_VCPUINFO_MAX);
return -1;
}
if (VIR_INT_MULTIPLY_OVERFLOW(maxinfo, maplen) ||
maxinfo * maplen > REMOTE_CPUMAPS_MAX) {
virReportError(VIR_ERR_RPC,
- _("vCPU map buffer length exceeds maximum: %d > %d"),
+ _("vCPU map buffer length exceeds maximum: %1$d > %2$d"),
maxinfo * maplen, REMOTE_CPUMAPS_MAX);
return -1;
}
if (ret.info.info_len > maxinfo) {
virReportError(VIR_ERR_RPC,
- _("host reports too many vCPUs: %d > %d"),
+ _("host reports too many vCPUs: %1$d > %2$d"),
ret.info.info_len, maxinfo);
goto cleanup;
}
if (ret.cpumaps.cpumaps_len > maxinfo * maplen) {
virReportError(VIR_ERR_RPC,
- _("host reports map buffer length exceeds maximum: %d > %d"),
+ _("host reports map buffer length exceeds maximum: %1$d > %2$d"),
ret.cpumaps.cpumaps_len, maxinfo * maplen);
goto cleanup;
}
if (ret.info.info_len > REMOTE_IOTHREAD_INFO_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Too many IOThreads in info: %d for limit %d"),
+ _("Too many IOThreads in info: %1$d for limit %2$d"),
ret.info.info_len, REMOTE_IOTHREAD_INFO_MAX);
goto cleanup;
}
if (ret.label.label_val != NULL) {
if (virStrcpyStatic(seclabel->label, ret.label.label_val) < 0) {
- virReportError(VIR_ERR_RPC, _("security label exceeds maximum: %zu"),
+ virReportError(VIR_ERR_RPC, _("security label exceeds maximum: %1$zu"),
sizeof(seclabel->label) - 1);
goto cleanup;
}
remote_domain_get_security_label_ret *cur = &ret.labels.labels_val[i];
if (cur->label.label_val != NULL) {
if (virStrcpyStatic((*seclabels)[i].label, cur->label.label_val) < 0) {
- virReportError(VIR_ERR_RPC, _("security label exceeds maximum: %zd"),
+ virReportError(VIR_ERR_RPC, _("security label exceeds maximum: %1$zd"),
sizeof((*seclabels)->label) - 1);
VIR_FREE(*seclabels);
goto cleanup;
if (ret.model.model_val != NULL) {
if (virStrcpyStatic(secmodel->model, ret.model.model_val) < 0) {
- virReportError(VIR_ERR_RPC, _("security model exceeds maximum: %zu"),
+ virReportError(VIR_ERR_RPC, _("security model exceeds maximum: %1$zu"),
sizeof(secmodel->model) - 1);
goto cleanup;
}
if (ret.doi.doi_val != NULL) {
if (virStrcpyStatic(secmodel->doi, ret.doi.doi_val) < 0) {
- virReportError(VIR_ERR_RPC, _("security doi exceeds maximum: %zu"),
+ virReportError(VIR_ERR_RPC, _("security doi exceeds maximum: %1$zu"),
sizeof(secmodel->doi) - 1);
goto cleanup;
}
make_nonnull_domain(&args.dom, domain);
if (nr_stats > REMOTE_DOMAIN_MEMORY_STATS_MAX) {
virReportError(VIR_ERR_RPC,
- _("too many memory stats requested: %d > %d"), nr_stats,
+ _("too many memory stats requested: %1$d > %2$d"), nr_stats,
REMOTE_DOMAIN_MEMORY_STATS_MAX);
return -1;
}
if (size > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX) {
virReportError(VIR_ERR_RPC,
- _("block peek request too large for remote protocol, %zi > %d"),
+ _("block peek request too large for remote protocol, %1$zi > %2$d"),
size, REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX);
return -1;
}
if (size > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX) {
virReportError(VIR_ERR_RPC,
- _("memory peek request too large for remote protocol, %zi > %d"),
+ _("memory peek request too large for remote protocol, %1$zi > %2$d"),
size, REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX);
return -1;
}
if (nparams > REMOTE_NODE_CPU_STATS_MAX) {
virReportError(VIR_ERR_RPC,
- _("nparams count exceeds maximum: %u > %u"),
+ _("nparams count exceeds maximum: %1$u > %2$u"),
nparams, REMOTE_NODE_CPU_STATS_MAX);
return -1;
}
if (ncpus > REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX) {
virReportError(VIR_ERR_RPC,
- _("ncpus count exceeds maximum: %u > %u"),
+ _("ncpus count exceeds maximum: %1$u > %2$u"),
ncpus, REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX);
return -1;
}
want = REMOTE_AUTH_POLKIT;
} else {
virReportError(VIR_ERR_AUTH_FAILED,
- _("unknown authentication type %s"), authtype);
+ _("unknown authentication type %1$s"), authtype);
return -1;
}
for (i = 0; i < ret.types.types_len; i++) {
}
if (type == REMOTE_AUTH_NONE) {
virReportError(VIR_ERR_AUTH_FAILED,
- _("requested authentication type %s rejected"),
+ _("requested authentication type %1$s rejected"),
authtype);
return -1;
}
default:
virReportError(VIR_ERR_AUTH_FAILED,
- _("unsupported authentication type %d"),
+ _("unsupported authentication type %1$d"),
ret.types.types_val[0]);
VIR_FREE(ret.types.types_val);
return -1;
if (wantmech) {
if (strstr(mechlist, wantmech) == NULL) {
virReportError(VIR_ERR_AUTH_FAILED,
- _("SASL mechanism %s not supported by server"),
+ _("SASL mechanism %1$s not supported by server"),
wantmech);
VIR_FREE(iret.mechlist);
goto cleanup;
if (clientoutlen > REMOTE_AUTH_SASL_DATA_MAX) {
virReportError(VIR_ERR_AUTH_FAILED,
- _("SASL negotiation data too long: %zu bytes"),
+ _("SASL negotiation data too long: %1$zu bytes"),
clientoutlen);
goto cleanup;
}
VIR_DEBUG("SASL SSF value %d", ssf);
if (ssf < 56) { /* 56 == DES level, good for Kerberos */
virReportError(VIR_ERR_AUTH_FAILED,
- _("negotiation SSF %d was not strong enough"), ssf);
+ _("negotiation SSF %1$d was not strong enough"), ssf);
goto cleanup;
}
if (ssf < SSF_WARNING_LEVEL) {
/* Check the length of the returned list carefully. */
if (ret.models.models_len > REMOTE_CONNECT_CPU_MODELS_MAX) {
virReportError(VIR_ERR_RPC,
- _("Too many model names '%d' for limit '%d'"),
+ _("Too many model names '%1$d' for limit '%2$d'"),
ret.models.models_len,
REMOTE_CONNECT_CPU_MODELS_MAX);
goto cleanup;
if (npages * cellCount > REMOTE_NODE_MAX_CELLS) {
virReportError(VIR_ERR_RPC,
- _("too many NUMA cells: %d > %d"),
+ _("too many NUMA cells: %1$d > %2$d"),
npages * cellCount, REMOTE_NODE_MAX_CELLS);
return -1;
}
if (ret.leases.leases_len > REMOTE_NETWORK_DHCP_LEASES_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of leases is %d, which exceeds max limit: %d"),
+ _("Number of leases is %1$d, which exceeds max limit: %2$d"),
ret.leases.leases_len, REMOTE_NETWORK_DHCP_LEASES_MAX);
goto cleanup;
}
if (ret.retStats.retStats_len > REMOTE_DOMAIN_LIST_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of stats entries is %d, which exceeds max limit: %d"),
+ _("Number of stats entries is %1$d, which exceeds max limit: %2$d"),
ret.retStats.retStats_len, REMOTE_DOMAIN_LIST_MAX);
goto cleanup;
}
if (npages > REMOTE_NODE_MAX_CELLS) {
virReportError(VIR_ERR_RPC,
- _("too many NUMA cells: %d > %d"),
+ _("too many NUMA cells: %1$d > %2$d"),
npages, REMOTE_NODE_MAX_CELLS);
return -1;
}
if (ret.info.info_len > REMOTE_DOMAIN_FSINFO_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Too many mountpoints in fsinfo: %d for limit %d"),
+ _("Too many mountpoints in fsinfo: %1$d for limit %2$d"),
ret.info.info_len, REMOTE_DOMAIN_FSINFO_MAX);
goto cleanup;
}
if (ret.ifaces.ifaces_len > REMOTE_DOMAIN_INTERFACE_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of interfaces, %d exceeds the max limit: %d"),
+ _("Number of interfaces, %1$d exceeds the max limit: %2$d"),
ret.ifaces.ifaces_len, REMOTE_DOMAIN_INTERFACE_MAX);
goto cleanup;
}
if (iface_ret->addrs.addrs_len > REMOTE_DOMAIN_IP_ADDR_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Number of interfaces, %d exceeds the max limit: %d"),
+ _("Number of interfaces, %1$d exceeds the max limit: %2$d"),
iface_ret->addrs.addrs_len, REMOTE_DOMAIN_IP_ADDR_MAX);
goto cleanup;
}
if (val == REMOTE_DRIVER_TRANSPORT_UNIX &&
uri->server) {
virReportError(VIR_ERR_INVALID_ARG,
- _("using unix socket and remote "
- "server '%s' is not supported."),
+ _("using unix socket and remote server '%1$s' is not supported."),
uri->server);
return -1;
}
case REMOTE_DRIVER_MODE_DIRECT:
if (transport != REMOTE_DRIVER_TRANSPORT_UNIX) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("Cannot use direct socket mode for %s transport"),
+ _("Cannot use direct socket mode for %1$s transport"),
remoteDriverTransportTypeToString(transport));
return NULL;
}
"clients. Not intended to be called directly by the user.");
g_option_context_add_main_entries(context, entries, PACKAGE);
if (!g_option_context_parse(context, &argc, &argv, &error)) {
- g_printerr(_("option parsing failed: %s\n"), error->message);
+ g_printerr(_("option parsing failed: %1$s\n"), error->message);
exit(EXIT_FAILURE);
}
if (virGettextInitialize() < 0 ||
virErrorInitialize() < 0) {
- g_printerr(_("%s: initialization failed\n"), argv[0]);
+ g_printerr(_("%1$s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
}
}
if (remoteSplitURIScheme(uri, &driver, &transport) < 0) {
- g_printerr(_("%s: cannot parse URI transport '%s': %s\n"),
+ g_printerr(_("%1$s: cannot parse URI transport '%2$s': %3$s\n"),
argv[0], uri_str, virGetLastErrorMessage());
exit(EXIT_FAILURE);
}
if (transport != REMOTE_DRIVER_TRANSPORT_UNIX) {
- g_printerr(_("%s: unexpected URI transport '%s'\n"),
+ g_printerr(_("%1$s: unexpected URI transport '%2$s'\n"),
argv[0], uri_str);
exit(EXIT_FAILURE);
}
if (mode_str &&
(mode = remoteDriverModeTypeFromString(mode_str)) < 0) {
- g_printerr(_("%s: unknown remote mode '%s'"), argv[0], mode_str);
+ g_printerr(_("%1$s: unknown remote mode '%2$s'"), argv[0], mode_str);
exit(EXIT_FAILURE);
}
if (!sock_path &&
!(sock_path = remoteGetUNIXSocket(transport, mode,
driver, flags, &daemon_path))) {
- g_printerr(_("%s: failed to generate UNIX socket path"), argv[0]);
+ g_printerr(_("%1$s: failed to generate UNIX socket path"), argv[0]);
exit(EXIT_FAILURE);
}
if (virNetSocketNewConnectUNIX(sock_path, daemon_path, &sock) < 0) {
- g_printerr(_("%s: cannot connect to '%s': %s\n"),
+ g_printerr(_("%1$s: cannot connect to '%2$s': %3$s\n"),
argv[0], sock_path, virGetLastErrorMessage());
exit(EXIT_FAILURE);
}
if (virRemoteSSHHelperRun(sock) < 0) {
- g_printerr(_("%s: could not proxy traffic: %s\n"),
+ g_printerr(_("%1$s: could not proxy traffic: %2$s\n"),
argv[0], virGetLastErrorMessage());
exit(EXIT_FAILURE);
}