Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/vbox/vbox_XPCOMCGlue.c | 6 +-
src/vbox/vbox_common.c | 157 +++++++++++++++++-----------------
src/vbox/vbox_network.c | 2 +-
src/vbox/vbox_snapshot_conf.c | 12 +--
src/vbox/vbox_storage.c | 20 ++---
src/vbox/vbox_tmpl.c | 16 ++--
6 files changed, 106 insertions(+), 107 deletions(-)
diff --git a/src/vbox/vbox_XPCOMCGlue.c b/src/vbox/vbox_XPCOMCGlue.c
index 77a3041612..688211d122 100644
--- a/src/vbox/vbox_XPCOMCGlue.c
+++ b/src/vbox/vbox_XPCOMCGlue.c
@@ -86,7 +86,7 @@ tryLoadOne(const char *dir, bool setAppHome, bool ignoreMissing,
if (!virFileExists(name)) {
if (!ignoreMissing)
- VIR_ERROR(_("Library '%s' doesn't exist"), name);
+ VIR_ERROR(_("Library '%1$s' doesn't exist"),
name);
VIR_FREE(name);
return -1;
@@ -124,7 +124,7 @@ tryLoadOne(const char *dir, bool setAppHome, bool ignoreMissing,
dlsym(hVBoxXPCOMC, VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME);
if (pfnGetFunctions == NULL) {
- VIR_ERROR(_("Could not dlsym %s from '%s': %s"),
+ VIR_ERROR(_("Could not dlsym %1$s from '%2$s': %3$s"),
VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME, name, dlerror());
goto cleanup;
}
@@ -132,7 +132,7 @@ tryLoadOne(const char *dir, bool setAppHome, bool ignoreMissing,
pVBoxFuncs_v2_2 = pfnGetFunctions(VBOX_XPCOMC_VERSION);
if (pVBoxFuncs_v2_2 == NULL) {
- VIR_ERROR(_("Calling %s from '%s' failed"),
+ VIR_ERROR(_("Calling %1$s from '%2$s' failed"),
VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME, name);
goto cleanup;
}
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 7aed421390..34ca0cc28c 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -493,7 +493,7 @@ vboxSetStorageController(virDomainControllerDef *controller,
case VIR_DOMAIN_CONTROLLER_TYPE_ISA:
case VIR_DOMAIN_CONTROLLER_TYPE_LAST:
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("The vbox driver does not support %s controller
type"),
+ _("The vbox driver does not support %1$s controller
type"),
virDomainControllerTypeToString(controller->type));
return -1;
}
@@ -527,13 +527,13 @@ vboxSetStorageController(virDomainControllerDef *controller,
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DC390:
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AM53C974:
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("The vbox driver does not support %s SCSI controller
model"),
+ _("The vbox driver does not support %1$s SCSI controller
model"),
virDomainControllerModelSCSITypeToString(controller->model));
goto cleanup;
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT:
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST:
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unexpected SCSI controller model %d"),
+ _("Unexpected SCSI controller model %1$d"),
controller->model);
goto cleanup;
}
@@ -555,7 +555,7 @@ vboxSetStorageController(virDomainControllerDef *controller,
case VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST:
case VIR_DOMAIN_CONTROLLER_MODEL_IDE_DEFAULT:
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unexpected IDE controller model %d"),
+ _("Unexpected IDE controller model %1$d"),
controller->model);
goto cleanup;
}
@@ -570,7 +570,7 @@ vboxSetStorageController(virDomainControllerDef *controller,
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to add storage controller (name: %s, busType:
%d)"),
+ _("Failed to add storage controller (name: %1$s, busType:
%2$d)"),
debugName, vboxBusType);
goto cleanup;
}
@@ -883,7 +883,7 @@ static virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id)
* starts from 1, so refuse id == 0, and adjust the rest */
if (id == 0) {
vboxReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching id %d"), id);
+ _("no domain with matching id %1$d"), id);
return NULL;
}
id = id - 1;
@@ -1163,7 +1163,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
if (type != VIR_STORAGE_TYPE_FILE) {
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Unsupported storage type %s, the only supported type
is %s"),
+ _("Unsupported storage type %1$s, the only supported
type is %2$s"),
virStorageTypeToString(type),
virStorageTypeToString(VIR_STORAGE_TYPE_FILE));
ret = -1;
@@ -1197,7 +1197,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
case VIR_DOMAIN_DISK_DEVICE_LUN:
case VIR_DOMAIN_DISK_DEVICE_LAST:
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("The vbox driver does not support %s disk
device"),
+ _("The vbox driver does not support %1$s disk
device"),
virDomainDiskDeviceTypeToString(disk->device));
ret = -1;
goto cleanup;
@@ -1238,7 +1238,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
case VIR_DOMAIN_DISK_BUS_NONE:
case VIR_DOMAIN_DISK_BUS_LAST:
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("The vbox driver does not support %s bus type"),
+ _("The vbox driver does not support %1$s bus
type"),
virDomainDiskBusTypeToString(disk->bus));
ret = -1;
goto cleanup;
@@ -1269,7 +1269,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
if (!medium) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to open the following disk/dvd/floppy to
the machine: %s"),
+ _("Failed to open the following disk/dvd/floppy to
the machine: %1$s"),
src);
ret = -1;
goto cleanup;
@@ -1278,7 +1278,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
rc = gVBoxAPI.UIMedium.GetId(medium, &mediumUUID);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Can't get the UUID of the file to be attached
as harddisk/dvd/floppy: %s"),
+ _("Can't get the UUID of the file to be attached
as harddisk/dvd/floppy: %1$s"),
src);
ret = -1;
goto cleanup;
@@ -1313,7 +1313,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not attach the file as harddisk/dvd/floppy:
%s"),
+ _("Could not attach the file as harddisk/dvd/floppy:
%1$s"),
src);
ret = -1;
goto cleanup;
@@ -1983,7 +1983,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
VIR_DIV_UP(def->mem.cur_balloon, 1024));
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not set the memory size of the domain to: %llu
Kb"),
+ _("could not set the memory size of the domain to: %1$llu
Kb"),
def->mem.cur_balloon);
}
@@ -1994,7 +1994,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
rc = gVBoxAPI.UIMachine.SetCPUCount(machine, virDomainDefGetVcpusMax(def));
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not set the number of virtual CPUs to: %u"),
+ _("could not set the number of virtual CPUs to:
%1$u"),
virDomainDefGetVcpusMax(def));
}
@@ -2003,7 +2003,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
VIR_TRISTATE_SWITCH_ON);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not change PAE status to: %s"),
+ _("could not change PAE status to: %1$s"),
(def->features[VIR_DOMAIN_FEATURE_PAE] ==
VIR_TRISTATE_SWITCH_ON)
? _("Enabled") : _("Disabled"));
}
@@ -2015,7 +2015,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
VIR_TRISTATE_SWITCH_ON);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not change ACPI status to: %s"),
+ _("could not change ACPI status to: %1$s"),
(def->features[VIR_DOMAIN_FEATURE_ACPI] ==
VIR_TRISTATE_SWITCH_ON)
? _("Enabled") : _("Disabled"));
}
@@ -2024,7 +2024,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
VIR_TRISTATE_SWITCH_ON);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not change APIC status to: %s"),
+ _("could not change APIC status to: %1$s"),
(def->features[VIR_DOMAIN_FEATURE_APIC] ==
VIR_TRISTATE_SWITCH_ON)
? _("Enabled") : _("Disabled"));
}
@@ -2829,7 +2829,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long
memory)
ret = 0;
} else {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not set the memory size of the domain to: %lu
Kb"),
+ _("could not set the memory size of the domain to: %1$lu
Kb"),
memory);
}
}
@@ -2967,7 +2967,7 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int
nvcpus,
return ret;
if (flags != VIR_DOMAIN_AFFECT_LIVE) {
- vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
flags);
+ vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%1$x)"),
flags);
return -1;
}
@@ -2984,17 +2984,17 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int
nvcpus,
ret = 0;
} else {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not set the number of cpus of the domain
to: %u"),
+ _("could not set the number of cpus of the domain
to: %1$u"),
CPUCount);
}
VBOX_RELEASE(machine);
} else {
vboxReportError(VIR_ERR_NO_DOMAIN,
- _("no domain with matching id %d"), dom->id);
+ _("no domain with matching id %1$d"), dom->id);
}
} else {
vboxReportError(VIR_ERR_NO_DOMAIN,
- _("can't open session to the domain with id %d"),
dom->id);
+ _("can't open session to the domain with id %1$d"),
dom->id);
}
gVBoxAPI.UISession.Close(data->vboxSession);
@@ -3018,7 +3018,7 @@ static int vboxDomainGetVcpusFlags(virDomainPtr dom, unsigned int
flags)
return ret;
if (flags != (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_VCPU_MAXIMUM)) {
- vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%x)"),
flags);
+ vboxReportError(VIR_ERR_INVALID_ARG, _("unsupported flags: (0x%1$x)"),
flags);
return -1;
}
@@ -3233,7 +3233,7 @@ vboxDumpStorageControllers(virDomainDef *def, IMachine *machine)
cont = virDomainDefAddController(def, type, -1, model);
if (!cont) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to add %s controller type
definition"),
+ _("Failed to add %1$s controller type
definition"),
virDomainControllerTypeToString(type));
goto cleanup;
}
@@ -3391,7 +3391,7 @@ vboxDumpDisks(virDomainDef *def, struct _vboxDriver *data, IMachine
*machine)
if (!disk->dst) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not generate medium name for the disk at:
port:%d, slot:%d"),
+ _("Could not generate medium name for the disk at:
port:%1$d, slot:%2$d"),
devicePort, deviceSlot);
goto cleanup;
}
@@ -3469,7 +3469,7 @@ vboxDumpDisks(virDomainDef *def, struct _vboxDriver *data, IMachine
*machine)
case DeviceType_SharedFolder:
case DeviceType_Null:
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unsupported vbox device type: %d"),
deviceType);
+ _("Unsupported vbox device type: %1$d"),
deviceType);
goto cleanup;
}
@@ -4351,7 +4351,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom,
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not attach shared folder
'%s'"),
+ _("could not attach shared folder
'%1$s'"),
dev->data.fs->dst);
ret = -1;
} else {
@@ -4365,7 +4365,7 @@ vboxDomainAttachDeviceImpl(virDomainPtr dom,
VBOX_RELEASE(machine);
if (ret == -VIR_ERR_ARGUMENT_UNSUPPORTED) {
- vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported device type
%d"), dev->type);
+ vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported device type
%1$d"), dev->type);
ret = -1;
}
}
@@ -4469,7 +4469,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char
*xml)
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not detach shared folder
'%s'"),
+ _("could not detach shared folder
'%1$s'"),
dev->data.fs->dst);
} else {
ret = 0;
@@ -4481,7 +4481,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char
*xml)
VBOX_RELEASE(machine);
if (ret == -VIR_ERR_ARGUMENT_UNSUPPORTED) {
- vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported device type
%d"), dev->type);
+ vboxReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, _("Unsupported device type
%1$d"), dev->type);
ret = -1;
}
}
@@ -4786,7 +4786,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
*/
if (unlink(currentSnapshotXmlFilePath) < 0) {
virReportSystemError(errno,
- _("Unable to delete file %s"),
currentSnapshotXmlFilePath);
+ _("Unable to delete file %1$s"),
currentSnapshotXmlFilePath);
goto cleanup;
}
}
@@ -4942,7 +4942,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Error while closing medium, rc=%08x"),
+ _("Error while closing medium,
rc=%1$08x"),
resultCode.uResultCode);
VIR_FREE(locationUtf8);
goto cleanup;
@@ -5160,7 +5160,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find UUID %s"),
searchResultTab[it]);
+ _("Unable to find UUID %1$s"),
searchResultTab[it]);
goto cleanup;
}
@@ -5249,7 +5249,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Error while creating diff storage,
rc=%08x"),
+ _("Error while creating diff storage,
rc=%1$08x"),
resultCode.uResultCode);
goto cleanup;
}
@@ -5294,7 +5294,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find UUID %s"),
searchResultTab[it]);
+ _("Unable to find UUID %1$s"),
searchResultTab[it]);
goto cleanup;
}
@@ -5480,7 +5480,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
rc = gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not open VirtualBox session with domain %s"),
+ _("could not open VirtualBox session with domain
%1$s"),
dom->name);
goto cleanup;
}
@@ -5494,7 +5494,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
rc = gVBoxAPI.UIConsole.TakeSnapshot(console, name, description, &progress);
if (NS_FAILED(rc) || !progress) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not take snapshot of domain %s"),
dom->name);
+ _("could not take snapshot of domain %1$s"),
dom->name);
goto cleanup;
}
@@ -5502,14 +5502,14 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
gVBoxAPI.UIProgress.GetResultCode(progress, &result);
if (RC_FAILED(result)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not take snapshot of domain %s"),
dom->name);
+ _("could not take snapshot of domain %1$s"),
dom->name);
goto cleanup;
}
rc = gVBoxAPI.UIMachine.GetCurrentSnapshot(machine, &snapshot);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get current snapshot of domain %s"),
+ _("could not get current snapshot of domain %1$s"),
dom->name);
goto cleanup;
}
@@ -5544,7 +5544,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom,
rc = gVBoxAPI.UIMachine.GetSnapshotCount(machine, &count);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get snapshot count for domain %s"),
+ _("could not get snapshot count for domain %1$s"),
dom->name);
goto error;
}
@@ -5557,7 +5557,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom,
rc = gVBoxAPI.UIMachine.FindSnapshot(machine, &empty, list);
if (NS_FAILED(rc) || !list[0]) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get root snapshot for domain %s"),
+ _("could not get root snapshot for domain %1$s"),
dom->name);
goto error;
}
@@ -5570,7 +5570,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom,
if (!list[next]) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected number of snapshots < %u"),
count);
+ _("unexpected number of snapshots < %1$u"),
count);
goto error;
}
@@ -5587,7 +5587,7 @@ vboxDomainSnapshotGetAll(virDomainPtr dom,
continue;
if (top == count) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected number of snapshots > %u"),
count);
+ _("unexpected number of snapshots > %1$u"),
count);
gVBoxAPI.UArray.vboxArrayRelease(&children);
goto error;
}
@@ -5647,7 +5647,7 @@ vboxDomainSnapshotGet(struct _vboxDriver *data,
if (!snapshot) {
vboxReportError(VIR_ERR_OPERATION_INVALID,
- _("domain %s has no snapshots with name %s"),
+ _("domain %1$s has no snapshots with name %2$s"),
dom->name, name);
goto cleanup;
}
@@ -6066,7 +6066,7 @@ vboxSnapshotGetReadOnlyDisks(virDomainSnapshotDef *def,
sdCount);
if (!defdom->disks[diskCount]->dst) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not generate medium name for the disk at:
port:%d, slot:%d"), devicePort, deviceSlot);
+ _("Could not generate medium name for the disk at:
port:%1$d, slot:%2$d"), devicePort, deviceSlot);
ret = -1;
goto cleanup;
}
@@ -6188,7 +6188,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr
snapshot,
rc = gVBoxAPI.UISnapshot.GetDescription(snap, &str16);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get description of snapshot %s"),
+ _("could not get description of snapshot %1$s"),
snapshot->name);
goto cleanup;
}
@@ -6202,7 +6202,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr
snapshot,
rc = gVBoxAPI.UISnapshot.GetTimeStamp(snap, ×tamp);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get creation time of snapshot %s"),
+ _("could not get creation time of snapshot %1$s"),
snapshot->name);
goto cleanup;
}
@@ -6212,7 +6212,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr
snapshot,
rc = gVBoxAPI.UISnapshot.GetParent(snap, &parent);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get parent of snapshot %s"),
+ _("could not get parent of snapshot %1$s"),
snapshot->name);
goto cleanup;
}
@@ -6220,7 +6220,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr
snapshot,
rc = gVBoxAPI.UISnapshot.GetName(parent, &str16);
if (NS_FAILED(rc) || !str16) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get name of parent of snapshot %s"),
+ _("could not get name of parent of snapshot
%1$s"),
snapshot->name);
goto cleanup;
}
@@ -6233,7 +6233,7 @@ static char *vboxDomainSnapshotGetXMLDesc(virDomainSnapshotPtr
snapshot,
rc = gVBoxAPI.UISnapshot.GetOnline(snap, &online);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get online state of snapshot %s"),
+ _("could not get online state of snapshot %1$s"),
snapshot->name);
goto cleanup;
}
@@ -6281,7 +6281,7 @@ static int vboxDomainSnapshotNum(virDomainPtr dom, unsigned int
flags)
rc = gVBoxAPI.UIMachine.GetSnapshotCount(machine, &snapshotCount);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get snapshot count for domain %s"),
+ _("could not get snapshot count for domain %1$s"),
dom->name);
goto cleanup;
}
@@ -6331,7 +6331,7 @@ static int vboxDomainSnapshotListNames(virDomainPtr dom, char
**names,
rc = gVBoxAPI.UIMachine.FindSnapshot(machine, &empty, snapshots);
if (NS_FAILED(rc) || !snapshots[0]) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get root snapshot for domain %s"),
+ _("could not get root snapshot for domain %1$s"),
dom->name);
goto cleanup;
}
@@ -6469,13 +6469,13 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
rc = gVBoxAPI.UISnapshot.GetParent(snap, &parent);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get parent of snapshot %s"),
+ _("could not get parent of snapshot %1$s"),
snapshot->name);
goto cleanup;
}
if (!parent) {
vboxReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
- _("snapshot '%s' does not have a parent"),
+ _("snapshot '%1$s' does not have a parent"),
snapshot->name);
goto cleanup;
}
@@ -6483,7 +6483,7 @@ vboxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
rc = gVBoxAPI.UISnapshot.GetName(parent, &nameUtf16);
if (NS_FAILED(rc) || !nameUtf16) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get name of parent of snapshot %s"),
+ _("could not get name of parent of snapshot %1$s"),
snapshot->name);
goto cleanup;
}
@@ -6671,7 +6671,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr
snapshot,
rc = gVBoxAPI.UISnapshot.GetOnline(newSnapshot, &online);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get online state of snapshot %s"),
+ _("could not get online state of snapshot %1$s"),
snapshot->name);
goto cleanup;
}
@@ -6679,7 +6679,7 @@ static int vboxDomainRevertToSnapshot(virDomainSnapshotPtr
snapshot,
rc = gVBoxAPI.UIMachine.GetCurrentSnapshot(machine, &prevSnapshot);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get current snapshot of domain %s"),
+ _("could not get current snapshot of domain %1$s"),
dom->name);
goto cleanup;
}
@@ -6976,7 +6976,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Error while creating diff storage,
rc=%08x"),
+ _("Error while creating diff storage,
rc=%1$08x"),
resultCode.uResultCode);
goto cleanup;
}
@@ -7021,7 +7021,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find UUID %s"),
searchResultTab[it]);
+ _("Unable to find UUID %1$s"),
searchResultTab[it]);
goto cleanup;
}
@@ -7050,7 +7050,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
def->parent.dom->disks[it]->src->path);
if (!uuidRO) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("No such disk in media registry %s"),
+ _("No such disk in media registry %1$s"),
def->parent.dom->disks[it]->src->path);
goto cleanup;
}
@@ -7061,7 +7061,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
&searchResultTab);
if (resultSize != it + 1) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find UUID %s"),
+ _("Unable to find UUID %1$s"),
searchResultTab[it]);
goto cleanup;
}
@@ -7085,12 +7085,12 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr
snapshot)
def->disks[it].src->path);
if (!uuidRW) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find UUID for location %s"),
def->disks[it].src->path);
+ _("Unable to find UUID for location %1$s"),
def->disks[it].src->path);
goto cleanup;
}
if (virVBoxSnapshotConfRemoveHardDisk(snapshotMachineDesc->mediaRegistry,
uuidRW) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to remove disk from media registry. uuid =
%s"), uuidRW);
+ _("Unable to remove disk from media registry. uuid =
%1$s"), uuidRW);
goto cleanup;
}
}
@@ -7102,12 +7102,12 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr
snapshot)
def->parent.dom->disks[it]->src->path);
if (!uuidRO) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find UUID for location %s"),
def->parent.dom->disks[it]->src->path);
+ _("Unable to find UUID for location %1$s"),
def->parent.dom->disks[it]->src->path);
goto cleanup;
}
if (virVBoxSnapshotConfRemoveHardDisk(snapshotMachineDesc->mediaRegistry,
uuidRO) < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to remove disk from media registry. uuid =
%s"), uuidRO);
+ _("Unable to remove disk from media registry. uuid =
%1$s"), uuidRO);
goto cleanup;
}
}
@@ -7146,7 +7146,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Error while closing medium, rc=%08x"),
+ _("Error while closing medium, rc=%1$08x"),
resultCode.uResultCode);
goto cleanup;
}
@@ -7167,7 +7167,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
/* removing the snapshot */
if (virVBoxSnapshotConfRemoveSnapshot(snapshotMachineDesc, def->parent.name) <
0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to remove snapshot %s"),
def->parent.name);
+ _("Unable to remove snapshot %1$s"),
def->parent.name);
goto cleanup;
}
@@ -7288,7 +7288,7 @@ static int vboxDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
rc = gVBoxAPI.UISession.GetConsole(data->vboxSession, &console);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not open VirtualBox session with domain %s"),
+ _("could not open VirtualBox session with domain
%1$s"),
dom->name);
goto cleanup;
}
@@ -7342,7 +7342,7 @@ vboxDomainScreenshot(virDomainPtr dom,
if (screen >= max_screen) {
vboxReportError(VIR_ERR_INVALID_ARG,
- _("screen ID higher than monitor count (%d)"),
max_screen);
+ _("screen ID higher than monitor count (%1$d)"),
max_screen);
VBOX_RELEASE(machine);
return NULL;
}
@@ -7356,7 +7356,7 @@ vboxDomainScreenshot(virDomainPtr dom,
tmp = g_strdup_printf("%s/vbox.screendump.XXXXXX", cacheDir);
if ((tmp_fd = g_mkstemp_full(tmp, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR)) == -1) {
- virReportSystemError(errno, _("g_mkstemp(\"%s\") failed"),
tmp);
+ virReportSystemError(errno, _("g_mkstemp(\"%1$s\") failed"),
tmp);
VBOX_RELEASE(machine);
return NULL;
}
@@ -7399,13 +7399,12 @@ vboxDomainScreenshot(virDomainPtr dom,
if (safewrite(tmp_fd, (char *) screenData,
screenDataSize) < 0) {
- virReportSystemError(errno, _("unable to write data "
- "to '%s'"), tmp);
+ virReportSystemError(errno, _("unable to write data to
'%1$s'"), tmp);
goto endjob;
}
if (VIR_CLOSE(tmp_fd) < 0) {
- virReportSystemError(errno, _("unable to close %s"), tmp);
+ virReportSystemError(errno, _("unable to close %1$s"),
tmp);
goto endjob;
}
@@ -7764,7 +7763,7 @@ vboxDomainSendKey(virDomainPtr dom,
keyDownCodes[i]);
if (keycode < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot translate keycode %u of %s codeset to xt
keycode"),
+ _("cannot translate keycode %1$u of %2$s codeset to
xt keycode"),
keyDownCodes[i],
virKeycodeSetTypeToString(codeset));
goto cleanup;
@@ -7782,7 +7781,7 @@ vboxDomainSendKey(virDomainPtr dom,
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_OPERATION_FAILED,
- _("Unable to open VirtualBox session with domain %s"),
+ _("Unable to open VirtualBox session with domain
%1$s"),
dom->name);
goto cleanup;
}
@@ -7791,7 +7790,7 @@ vboxDomainSendKey(virDomainPtr dom,
if (NS_FAILED(rc) || !console) {
vboxReportError(VIR_ERR_OPERATION_FAILED,
- _("Unable to get Console object for domain %s"),
+ _("Unable to get Console object for domain %1$s"),
dom->name);
goto cleanup;
}
@@ -7800,7 +7799,7 @@ vboxDomainSendKey(virDomainPtr dom,
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_OPERATION_FAILED,
- _("Unable to get Keyboard object for domain %s"),
+ _("Unable to get Keyboard object for domain %1$s"),
dom->name);
goto cleanup;
}
@@ -7810,7 +7809,7 @@ vboxDomainSendKey(virDomainPtr dom,
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_OPERATION_FAILED,
- _("Unable to send keyboard scancodes for domain %s"),
+ _("Unable to send keyboard scancodes for domain
%1$s"),
dom->name);
goto cleanup;
}
@@ -7825,7 +7824,7 @@ vboxDomainSendKey(virDomainPtr dom,
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_OPERATION_FAILED,
- _("Unable to send keyboard scan codes to domain %s"),
+ _("Unable to send keyboard scan codes to domain
%1$s"),
dom->name);
goto cleanup;
}
diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c
index 111bb7144a..31ab51f5e1 100644
--- a/src/vbox/vbox_network.c
+++ b/src/vbox/vbox_network.c
@@ -643,7 +643,7 @@ vboxNetworkUndefineDestroy(virNetworkPtr network, bool
removeinterface)
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Error while removing hostonly network interface,
rc=%08x"),
+ _("Error while removing hostonly network interface,
rc=%1$08x"),
resultCode.uResultCode);
goto cleanup;
}
diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c
index 2f3f48d688..d761676db0 100644
--- a/src/vbox/vbox_snapshot_conf.c
+++ b/src/vbox/vbox_snapshot_conf.c
@@ -594,7 +594,7 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
BAD_CAST "vbox",
BAD_CAST VBOX_SETTINGS_NS) < 0) {
virReportError(VIR_ERR_XML_ERROR,
- _("Failed to register xml namespace '%s'"),
+ _("Failed to register xml namespace '%1$s'"),
VBOX_SETTINGS_NS);
goto cleanup;
}
@@ -757,7 +757,7 @@ virVBoxSnapshotConfAddSnapshotToXmlMachine(virVBoxSnapshotConfSnapshot
*snapshot
parentSnapshot = virVBoxSnapshotConfSnapshotByName(machine->snapshot,
snapshotParentName);
if (parentSnapshot == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find the snapshot %s"),
snapshotParentName);
+ _("Unable to find the snapshot %1$s"),
snapshotParentName);
return -1;
}
VIR_EXPAND_N(parentSnapshot->children, parentSnapshot->nchildren, 1);
@@ -841,7 +841,7 @@ virVBoxSnapshotConfRemoveSnapshot(virVBoxSnapshotConfMachine
*machine,
snapshot = virVBoxSnapshotConfSnapshotByName(machine->snapshot, snapshotName);
if (snapshot == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find the snapshot with name %s"),
snapshotName);
+ _("Unable to find the snapshot with name %1$s"),
snapshotName);
return -1;
}
if (snapshot->nchildren > 0) {
@@ -902,7 +902,7 @@ virVBoxSnapshotConfRemoveHardDisk(virVBoxSnapshotConfMediaRegistry
*mediaRegistr
}
if (hardDisk == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to find the hard disk with uuid %s"), uuid);
+ _("Unable to find the hard disk with uuid %1$s"),
uuid);
return -1;
}
if (hardDisk->parent == NULL) {
@@ -1181,7 +1181,7 @@ virVBoxSnapshotConfIsCurrentSnapshot(virVBoxSnapshotConfMachine
*machine,
snapshot = virVBoxSnapshotConfSnapshotByName(machine->snapshot, snapshotName);
if (snapshot == NULL) {
virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
- _("Unable to find the snapshot %s"), snapshotName);
+ _("Unable to find the snapshot %1$s"), snapshotName);
return 0;
}
return STREQ(snapshot->uuid, machine->currentSnapshot);
@@ -1337,7 +1337,7 @@ virVBoxSnapshotConfRemoveFakeDisks(virVBoxSnapshotConfMachine
*machine)
if (strstr(diskList[i]->location, "fake") != NULL) {
if (virVBoxSnapshotConfRemoveHardDisk(machine->mediaRegistry,
diskList[i]->uuid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to remove hard disk %s from media
registry"),
+ _("Unable to remove hard disk %1$s from media
registry"),
diskList[i]->location);
goto cleanup;
}
diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c
index 27d8a474f2..41b19a9c62 100644
--- a/src/vbox/vbox_storage.c
+++ b/src/vbox/vbox_storage.c
@@ -97,7 +97,7 @@ static int vboxStoragePoolNumOfVolumes(virStoragePoolPtr pool)
gVBoxAPI.UArray.handleGetHardDisks(data->vboxObj));
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get number of volumes in the pool: %s,
rc=%08x"),
+ _("could not get number of volumes in the pool: %1$s,
rc=%2$08x"),
pool->name, (unsigned)rc);
return -1;
}
@@ -135,7 +135,7 @@ vboxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
int nname
gVBoxAPI.UArray.handleGetHardDisks(data->vboxObj));
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not get the volume list in the pool: %s,
rc=%08x"),
+ _("could not get the volume list in the pool: %1$s,
rc=%2$08x"),
pool->name, (unsigned)rc);
return -1;
}
@@ -267,7 +267,7 @@ vboxStorageVolLookupByKey(virConnectPtr conn, const char *key)
if (virUUIDParse(key, uuid) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Could not parse UUID from '%s'"), key);
+ _("Could not parse UUID from '%1$s'"), key);
return NULL;
}
@@ -457,7 +457,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool,
rc = gVBoxAPI.UIVirtualBox.CreateHardDisk(data->vboxObj, hddFormatUtf16,
hddNameUtf16, &hardDisk);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not create harddisk, rc=%08x"),
+ _("Could not create harddisk, rc=%1$08x"),
(unsigned)rc);
goto cleanup;
}
@@ -470,7 +470,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool,
rc = gVBoxAPI.UIMedium.CreateBaseStorage(hardDisk, logicalSize, variant,
&progress);
if (NS_FAILED(rc) || !progress) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not create base storage, rc=%08x"),
+ _("Could not create base storage, rc=%1$08x"),
(unsigned)rc);
goto cleanup;
}
@@ -479,7 +479,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool,
gVBoxAPI.UIProgress.GetResultCode(progress, &resultCode);
if (RC_FAILED(resultCode)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not create base storage, rc=%08x"),
+ _("Could not create base storage, rc=%1$08x"),
(unsigned)resultCode.uResultCode);
goto cleanup;
}
@@ -525,7 +525,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol, unsigned int
flags)
if (virUUIDParse(vol->key, uuid) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Could not parse UUID from '%s'"),
vol->key);
+ _("Could not parse UUID from '%1$s'"),
vol->key);
return -1;
}
@@ -676,7 +676,7 @@ static int vboxStorageVolGetInfo(virStorageVolPtr vol,
virStorageVolInfoPtr info
if (virUUIDParse(vol->key, uuid) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Could not parse UUID from '%s'"),
vol->key);
+ _("Could not parse UUID from '%1$s'"),
vol->key);
return ret;
}
@@ -737,7 +737,7 @@ static char *vboxStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned
int flags)
if (virUUIDParse(vol->key, uuid) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Could not parse UUID from '%s'"),
vol->key);
+ _("Could not parse UUID from '%1$s'"),
vol->key);
return ret;
}
@@ -818,7 +818,7 @@ static char *vboxStorageVolGetPath(virStorageVolPtr vol)
if (virUUIDParse(vol->key, uuid) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Could not parse UUID from '%s'"),
vol->key);
+ _("Could not parse UUID from '%1$s'"),
vol->key);
return ret;
}
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 3db8557c53..908625e702 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -317,14 +317,14 @@ _vboxDomainSnapshotRestore(virDomainPtr dom,
if (state >= MachineState_FirstOnline
&& state <= MachineState_LastOnline) {
virReportError(VIR_ERR_OPERATION_INVALID,
- _("domain %s is already running"), dom->name);
+ _("domain %1$s is already running"), dom->name);
goto cleanup;
}
rc = machine->vtbl->LockMachine(machine, data->vboxSession,
LockType_Write);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not open VirtualBox session with domain %s"),
+ _("could not open VirtualBox session with domain
%1$s"),
dom->name);
goto cleanup;
}
@@ -337,7 +337,7 @@ _vboxDomainSnapshotRestore(virDomainPtr dom,
_("cannot restore domain snapshot for running
domain"));
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not restore snapshot for domain %s"),
+ _("could not restore snapshot for domain %1$s"),
dom->name);
}
goto cleanup;
@@ -347,7 +347,7 @@ _vboxDomainSnapshotRestore(virDomainPtr dom,
progress->vtbl->GetResultCode(progress, &result);
if (NS_FAILED(result)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not restore snapshot for domain %s"),
dom->name);
+ _("could not restore snapshot for domain %1$s"),
dom->name);
goto cleanup;
}
@@ -1118,7 +1118,7 @@ _consoleSaveState(IConsole *console, IProgress **progress)
rc = machine->vtbl->SaveState(machine, progress);
else
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unable to get machine from console. (error %d)"),
rc);
+ _("unable to get machine from console. (error %1$d)"),
rc);
return rc;
}
@@ -1176,7 +1176,7 @@ _consoleTakeSnapshot(IConsole *console, PRUnichar *name,
rc = machine->vtbl->TakeSnapshot(machine, name, description, bpause,
&id, progress);
else
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unable to get machine from console. (error %d)"),
rc);
+ _("unable to get machine from console. (error %1$d)"),
rc);
VBOX_RELEASE(machine);
return rc;
@@ -1194,7 +1194,7 @@ _consoleDeleteSnapshot(IConsole *console, vboxIID *iid, IProgress
**progress)
rc = machine->vtbl->DeleteSnapshot(machine, iid->value, progress);
else
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unable to get machine from console. (error %d)"),
rc);
+ _("unable to get machine from console. (error %1$d)"),
rc);
VBOX_RELEASE(machine);
@@ -1584,7 +1584,7 @@ _vrdeServerGetPorts(struct _vboxDriver *data, IVRDEServer
*VRDEServer,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to read RDP port value, rc=%08x"),
+ _("Failed to read RDP port value, rc=%1$08x"),
(unsigned) rc);
goto cleanup;
}
--
2.39.2