brname = g_strdup(virDomainNetGetActualBridgeName(net));
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Network type %d is not supported"),
+ _("Network type %1$d is not supported"),
virDomainNetGetActualType(net));
goto cleanup;
}
case VIR_DOMAIN_AUDIO_TYPE_FILE:
case VIR_DOMAIN_AUDIO_TYPE_DBUS:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported audio backend '%s'"),
+ _("unsupported audio backend '%1$s'"),
virDomainAudioTypeTypeToString(audio->type));
return -1;
case VIR_DOMAIN_AUDIO_TYPE_LAST:
case VIR_DOMAIN_FS_TYPE_VOLUME:
case VIR_DOMAIN_FS_TYPE_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported filesystem type '%s'"),
+ _("unsupported filesystem type '%1$s'"),
virDomainFSTypeToString(fs->type));
return -1;
}
case VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP:
case VIR_DOMAIN_FS_DRIVER_TYPE_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported filesystem driver '%s'"),
+ _("unsupported filesystem driver '%1$s'"),
virDomainFSDriverTypeToString(fs->fsdriver));
return -1;
}
case VIR_DOMAIN_FS_ACCESSMODE_DEFAULT:
case VIR_DOMAIN_FS_ACCESSMODE_LAST:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported filesystem accessmode '%s'"),
+ _("unsupported filesystem accessmode '%1$s'"),
virDomainFSAccessModeTypeToString(fs->accessmode));
return -1;
}
break;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("unsupported clock offset '%s'"),
+ _("unsupported clock offset '%1$s'"),
virDomainClockOffsetTypeToString(def->clock.offset));
return NULL;
}
if (def->os.bootloaderArgs == NULL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Custom loader requires explicit %s configuration"),
+ _("Custom loader requires explicit %1$s configuration"),
"bootloader_args");
return NULL;
}
case VIR_DOMAIN_BOOT_LAST:
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Cannot boot from device %s"),
+ _("Cannot boot from device %1$s"),
virDomainBootTypeToString(def->os.bootDevs[0]));
return NULL;
}
if (match == NULL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Cannot find boot device of requested type %s"),
+ _("Cannot find boot device of requested type %1$s"),
virDomainBootTypeToString(def->os.bootDevs[0]));
return NULL;
}
if (idx < 0) {
virReportError(VIR_ERR_XML_ERROR,
- _("Unknown disk name '%s' and no address specified"),
+ _("Unknown disk name '%1$s' and no address specified"),
def->dst);
return -1;
}
VIR_DOMAIN_RUNNING_BOOTED, 0);
if (ret < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to autostart VM '%s': %s"),
+ _("Failed to autostart VM '%1$s': %2$s"),
vm->def->name, virGetLastErrorMessage());
}
}
if (!vm) {
virUUIDFormat(domain->uuid, uuidstr);
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching uuid '%s' (%s)"),
+ _("no domain with matching uuid '%1$s' (%2$s)"),
uuidstr, domain->name);
return NULL;
}
if (STRNEQ(conn->uri->path, "/system")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected bhyve URI path '%s', try bhyve:///system"),
+ _("Unexpected bhyve URI path '%1$s', try bhyve:///system"),
conn->uri->path);
return VIR_DRV_OPEN_ERROR;
}
if (virStringParseVersion(version, ver.release, true) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unknown release: %s"), ver.release);
+ _("Unknown release: %1$s"), ver.release);
return -1;
}
if (autostart) {
if (g_mkdir_with_parents(BHYVE_AUTOSTART_DIR, 0777) < 0) {
virReportSystemError(errno,
- _("cannot create autostart directory %s"),
+ _("cannot create autostart directory %1$s"),
BHYVE_AUTOSTART_DIR);
goto cleanup;
}
if (symlink(configFile, autostartLink) < 0) {
virReportSystemError(errno,
- _("Failed to create symlink '%s' to '%s'"),
+ _("Failed to create symlink '%1$s' to '%2$s'"),
autostartLink, configFile);
goto cleanup;
}
} else {
if (unlink(autostartLink) < 0 && errno != ENOENT && errno != ENOTDIR) {
virReportSystemError(errno,
- _("Failed to delete symlink '%s'"),
+ _("Failed to delete symlink '%1$s'"),
autostartLink);
goto cleanup;
}
if (STRNEQ(format, BHYVE_CONFIG_FORMAT_ARGV)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Unsupported config type %s"), format);
+ _("Unsupported config type %1$s"), format);
return NULL;
}
char uuidstr[VIR_UUID_STRING_BUFLEN];
virUUIDFormat(uuid, uuidstr);
virReportError(VIR_ERR_NO_DOMAIN,
- _("No domain with matching uuid '%s'"), uuidstr);
+ _("No domain with matching uuid '%1$s'"), uuidstr);
goto cleanup;
}
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching name '%s'"), name);
+ _("no domain with matching name '%1$s'"), name);
goto cleanup;
}
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
- _("No domain with matching ID '%d'"), id);
+ _("No domain with matching ID '%1$d'"), id);
goto cleanup;
}
if (g_mkdir_with_parents(BHYVE_LOG_DIR, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to mkdir %s"),
+ _("Failed to mkdir %1$s"),
BHYVE_LOG_DIR);
goto cleanup;
}
if (g_mkdir_with_parents(BHYVE_STATE_DIR, 0777) < 0) {
virReportSystemError(errno,
- _("Failed to mkdir %s"),
+ _("Failed to mkdir %1$s"),
BHYVE_STATE_DIR);
goto cleanup;
}
if (!type || STRCASEEQ(type, "bhyve"))
return 16;
- virReportError(VIR_ERR_INVALID_ARG, _("unknown type '%s'"), type);
+ virReportError(VIR_ERR_INVALID_ARG, _("unknown type '%1$s'"), type);
return -1;
}
if (STRNEQ(nativeFormat, BHYVE_CONFIG_FORMAT_ARGV)) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported config type %s"), nativeFormat);
+ _("unsupported config type %1$s"), nativeFormat);
return NULL;
}
if (virttype_str &&
(virttype = virDomainVirtTypeFromString(virttype_str)) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unknown virttype: %s"),
+ _("unknown virttype: %1$s"),
virttype_str);
goto cleanup;
}
if (virttype != VIR_DOMAIN_VIRT_BHYVE) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unknown virttype: %s"),
+ _("unknown virttype: %1$s"),
virttype_str);
goto cleanup;
}
if (arch_str && (arch = virArchFromString(arch_str)) == VIR_ARCH_NONE) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unknown architecture: %s"),
+ _("unknown architecture: %1$s"),
arch_str);
goto cleanup;
}
if (!ARCH_IS_X86(arch)) {
virReportError(VIR_ERR_NO_SUPPORT,
- _("unsupported architecture: %s"),
+ _("unsupported architecture: %1$s"),
virArchToString(arch));
goto cleanup;
}
if (!matching_firmware) {
if (!first_found) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("no firmwares found in %s"),
+ _("no firmwares found in %1$s"),
firmware_dir);
return -1;
} else {
if (def->os.loader->format != VIR_STORAGE_FILE_RAW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported loader format '%s'"),
+ _("Unsupported loader format '%1$s'"),
virStorageFileFormatTypeToString(def->os.loader->format));
return -1;
}
if (watch != mon->watch || kq != mon->kq) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("event from unexpected fd %d!=%d / watch %d!=%d"),
+ _("event from unexpected fd %1$d!=%2$d / watch %3$d!=%4$d"),
mon->kq, kq, mon->watch, watch);
return;
}
if (kev.filter == EVFILT_PROC && (kev.fflags & NOTE_EXIT) != 0) {
if ((pid_t)kev.ident != vm->pid) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("event from unexpected proc %ju!=%ju"),
+ _("event from unexpected proc %1$ju!=%2$ju"),
(uintmax_t)vm->pid, (uintmax_t)kev.ident);
return;
}
status = kev.data;
if (WIFSIGNALED(status) && WCOREDUMP(status)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Guest %s got signal %d and crashed"),
+ _("Guest %1$s got signal %2$d and crashed"),
name, WTERMSIG(status));
virBhyveProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_CRASHED);
} else if (WIFEXITED(status)) {
if (!STRPREFIX(param, "/dev/nmdm")) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Failed to set com port %s: does not start with "
- "'/dev/nmdm'."), type);
+ _("Failed to set com port %1$s: does not start with '/dev/nmdm'."),
+ type);
goto error;
}
break;
default:
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Failed to set slave for %s: last letter not "
- "'A' or 'B'"),
+ _("Failed to set slave for %1$s: last letter not 'A' or 'B'"),
NULLSTR(chr->source->data.nmdm.master));
goto error;
}
break;
default:
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Failed to parse %s: only com1 and com2"
- " supported."), type);
+ _("Failed to parse %1$s: only com1 and com2 supported."),
+ type);
goto error;
break;
}
if (virMacAddrParse(mac, &net->mac) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unable to parse mac address '%s'"),
+ _("unable to parse mac address '%1$s'"),
mac);
goto cleanup;
}
#define CONSUME_ARG(var) \
if ((opti + 1) == argc) { \
- virReportError(VIR_ERR_INVALID_ARG, _("Missing argument for '%s'"), \
+ virReportError(VIR_ERR_INVALID_ARG, _("Missing argument for '%1$s'"), \
argv[opti]); \
return -1; \
} \
CONSUME_ARG(arg);
if (virUUIDParse(arg, def->uuid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Cannot parse UUID '%s'"), arg);
+ _("Cannot parse UUID '%1$s'"), arg);
return -1;
}
break;
if ((logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT,
S_IRUSR | S_IWUSR)) < 0) {
virReportSystemError(errno,
- _("Failed to open '%s'"),
+ _("Failed to open '%1$s'"),
logfile);
goto cleanup;
}
if (unlink(driver->pidfile) < 0 &&
errno != ENOENT) {
virReportSystemError(errno,
- _("Cannot remove stale PID file %s"),
+ _("Cannot remove stale PID file %1$s"),
driver->pidfile);
goto cleanup;
}
rc = virFileWriteStr(devmap_file, devicemap, 0644);
if (rc) {
virReportSystemError(errno,
- _("Cannot write device.map '%s'"),
+ _("Cannot write device.map '%1$s'"),
devmap_file);
goto cleanup;
}
if (virPidFileReadPath(driver->pidfile, &vm->pid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Domain %s didn't show up"), vm->def->name);
+ _("Domain %1$s didn't show up"), vm->def->name);
goto cleanup;
}
if (devicemap != NULL) {
rc = unlink(devmap_file);
if (rc < 0 && errno != ENOENT)
- virReportSystemError(errno, _("cannot unlink file '%s'"),
+ virReportSystemError(errno, _("cannot unlink file '%1$s'"),
devmap_file);
}
if (vm->pid == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid PID %d for VM"),
+ _("Invalid PID %1$d for VM"),
(int)vm->pid);
return -1;
}
{
if (vm->pid == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid PID %d for VM"),
+ _("Invalid PID %1$d for VM"),
(int)vm->pid);
return -1;
}
if ((kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf)) == NULL) {
virReportError(VIR_ERR_SYSTEM_ERROR,
- _("Unable to get kvm descriptor: %s"),
+ _("Unable to get kvm descriptor: %1$s"),
errbuf);
return -1;
kp = kvm_getprocs(kd, KERN_PROC_PID, vm->pid, &nprocs);
if (kp == NULL || nprocs != 1) {
virReportError(VIR_ERR_SYSTEM_ERROR,
- _("Unable to obtain information about pid: %d"),
+ _("Unable to obtain information about pid: %1$d"),
(int)vm->pid);
goto cleanup;
}
if ((kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf)) == NULL) {
virReportError(VIR_ERR_SYSTEM_ERROR,
- _("Unable to get kvm descriptor: %s"),
+ _("Unable to get kvm descriptor: %1$s"),
errbuf);
return;