if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to add storage controller (name: %s, busType: %d), rc=%08x"),
- debugName, vboxBusType, rc);
+ _("Failed to add storage controller (name: %s, busType: %d)"),
+ debugName, vboxBusType);
goto cleanup;
}
rc = gVBoxAPI.UIStorageController.SetControllerType(vboxController,
vboxModel);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to change storage controller model, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Failed to change storage controller model"));
goto cleanup;
}
}
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of Domains, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of Domains"));
goto cleanup;
}
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get number of Domains, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get number of Domains"));
goto cleanup;
}
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of machines"));
return NULL;
}
VBOX_IID_INITIALIZE(&iid);
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of machines"));
return NULL;
}
VBOX_IID_INITIALIZE(&iid);
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of machines"));
return NULL;
}
if (!medium) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to open the following disk/dvd/floppy to the machine: %s, rc=%08x"),
- src, rc);
+ _("Failed to open the following disk/dvd/floppy to the machine: %s"),
+ src);
ret = -1;
goto cleanup;
}
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, rc=%08x"),
- src, rc);
+ _("Can't get the UUID of the file to be attached as harddisk/dvd/floppy: %s"),
+ src);
ret = -1;
goto cleanup;
}
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not attach the file as harddisk/dvd/floppy: %s, rc=%08x"),
- src, rc);
+ _("Could not attach the file as harddisk/dvd/floppy: %s"),
+ src);
ret = -1;
goto cleanup;
} else {
rc = gVBoxAPI.UIVirtualBox.CreateMachine(data, def, &machine, uuidstr);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not define a domain, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("could not define a domain"));
goto cleanup;
}
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, rc=%08x"),
- def->mem.cur_balloon, (unsigned)rc);
+ _("could not set the memory size of the domain to: %llu Kb"),
+ def->mem.cur_balloon);
}
if (virDomainDefHasVcpusOffline(def)) {
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, rc=%08x"),
- virDomainDefGetVcpusMax(def), (unsigned)rc);
+ _("could not set the number of virtual CPUs to: %u"),
+ virDomainDefGetVcpusMax(def));
}
rc = gVBoxAPI.UIMachine.SetCPUProperty(machine, CPUPropertyType_PAE,
VIR_TRISTATE_SWITCH_ON);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not change PAE status to: %s, rc=%08x"),
+ _("could not change PAE status to: %s"),
(def->features[VIR_DOMAIN_FEATURE_PAE] == VIR_TRISTATE_SWITCH_ON)
- ? _("Enabled") : _("Disabled"), (unsigned)rc);
+ ? _("Enabled") : _("Disabled"));
}
gVBoxAPI.UIMachine.GetBIOSSettings(machine, &bios);
VIR_TRISTATE_SWITCH_ON);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not change ACPI status to: %s, rc=%08x"),
+ _("could not change ACPI status to: %s"),
(def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON)
- ? _("Enabled") : _("Disabled"), (unsigned)rc);
+ ? _("Enabled") : _("Disabled"));
}
rc = gVBoxAPI.UIBIOSSettings.SetIOAPICEnabled(bios,
def->features[VIR_DOMAIN_FEATURE_APIC] ==
VIR_TRISTATE_SWITCH_ON);
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not change APIC status to: %s, rc=%08x"),
+ _("could not change APIC status to: %s"),
(def->features[VIR_DOMAIN_FEATURE_APIC] == VIR_TRISTATE_SWITCH_ON)
- ? _("Enabled") : _("Disabled"), (unsigned)rc);
+ ? _("Enabled") : _("Disabled"));
}
VBOX_RELEASE(bios);
}
/* Register the machine before attaching other devices to it */
rc = gVBoxAPI.UIVirtualBox.RegisterMachine(data->vboxObj, machine);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not define a domain, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("could not define a domain"));
goto cleanup;
}
*/
rc = gVBoxAPI.UIMachine.SaveSettings(machine);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to save VM settings, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Failed to save VM settings"));
machineReady = false;
}
gVBoxAPI.deleteConfig(machine);
ret = 0;
} else {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not delete the domain, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("could not delete the domain"));
}
vboxIIDUnalloc(&iid);
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of machines"));
return -1;
}
VBOX_IID_INITIALIZE(&iid);
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of machines"));
return ret;
}
ret = 0;
} else {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not set the memory size of the domain to: %lu Kb, rc=%08x"),
- memory, (unsigned)rc);
+ _("could not set the memory size of the domain to: %lu Kb"),
+ memory);
}
}
gVBoxAPI.UISession.Close(data->vboxSession);
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of machines"));
return -1;
}
ret = 0;
} else {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not set the number of cpus of the domain to: %u, rc=%08x"),
- CPUCount, (unsigned)rc);
+ _("could not set the number of cpus of the domain to: %u"),
+ CPUCount);
}
VBOX_RELEASE(machine);
} else {
rc = gVBoxAPI.UIMediumAttachment.GetMedium(mediumAttachment, &medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get IMedium, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get IMedium"));
goto cleanup;
}
rc = gVBoxAPI.UIMediumAttachment.GetMedium(mediumAttachment, &medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get IMedium, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get IMedium"));
goto cleanup;
}
rc = gVBoxAPI.UIMediumAttachment.GetController(mediumAttachment,
&controllerName);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Failed to get storage controller name, rc=%08x"),
- rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Failed to get storage controller name"));
goto cleanup;
}
controllerName,
&controller);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get storage controller by name, rc=%08x"),
- rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get storage controller by name"));
goto cleanup;
}
rc = gVBoxAPI.UIMediumAttachment.GetType(mediumAttachment, &deviceType);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get device type, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get device type"));
goto cleanup;
}
rc = gVBoxAPI.UIMediumAttachment.GetPort(mediumAttachment, &devicePort);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get device port, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get device port"));
goto cleanup;
}
rc = gVBoxAPI.UIMediumAttachment.GetDevice(mediumAttachment, &deviceSlot);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get device slot, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get device slot"));
goto cleanup;
}
rc = gVBoxAPI.UIStorageController.GetBus(controller, &storageBus);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get storage controller bus, rc=%08x"),
- rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get storage controller bus"));
goto cleanup;
}
if (medium) {
rc = gVBoxAPI.UIMedium.GetLocation(medium, &mediumLocUtf16);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get medium storage location, rc=%08x"),
- rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get medium storage location"));
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetReadOnly(medium, &readOnly);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get read only state, rc=%08x"), rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get read only state"));
goto cleanup;
}
}
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of Defined Domains, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of Defined Domains"));
goto cleanup;
}
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get number of Defined Domains, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get number of Defined Domains"));
goto cleanup;
}
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not attach shared folder '%s', rc=%08x"),
- dev->data.fs->dst, (unsigned)rc);
+ _("could not attach shared folder '%s'"),
+ dev->data.fs->dst);
ret = -1;
} else {
ret = 0;
if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not detach shared folder '%s', rc=%08x"),
- dev->data.fs->dst, (unsigned)rc);
+ _("could not detach shared folder '%s'"),
+ dev->data.fs->dst);
} else {
ret = 0;
}
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetChildren(medium, &childrenSize, &children);
}
rc = gVBoxAPI.UIMedium.Close(medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to close HardDisk"));
goto cleanup;
}
AccessMode_ReadWrite,
&readWriteMedium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf);
goto cleanup;
}
}
rc = gVBoxAPI.UIMedium.Close(readWriteMedium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to close HardDisk"));
goto cleanup;
}
}
AccessMode_ReadWrite,
&readOnlyMedium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf);
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetId(parentReadOnlyMedium, &parentiid);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to get hard disk id, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to get hard disk id"));
VIR_FREE(uuid);
goto cleanup;
}
rc = gVBoxAPI.UIMedium.Close(readOnlyMedium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to close HardDisk"));
VIR_FREE(uuid);
VIR_FREE(parentUuid);
goto cleanup;
&aMediaSize,
&aMedia);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to unregister machine, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to unregister machine"));
goto cleanup;
}
VBOX_RELEASE(machine);
resultCodeUnion resultCode;
rc = gVBoxAPI.UIMedium.DeleteStorage(medium, &progress);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to delete medium, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to delete medium"));
VIR_FREE(locationUtf8);
goto cleanup;
}
&medium);
VBOX_UTF16_FREE(locationUtf16);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
goto cleanup;
}
}
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf16);
/* Close disk */
rc = gVBoxAPI.UIMedium.Close(medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to close HardDisk"));
goto cleanup;
}
}
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
VBOX_UTF16_FREE(locationUtf16);
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetId(medium, &parentiid);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to get hardDisk Id, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to get hardDisk Id"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
VBOX_UTF16_FREE(newLocation);
VBOX_UTF16_FREE(formatUtf16);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to create HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to create HardDisk"));
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetId(newMedium, &iid);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to get medium uuid, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to get medium uuid"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
/* Closing the "fake" disk */
rc = gVBoxAPI.UIMedium.Close(newMedium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to close the new medium, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to close the new medium"));
goto cleanup;
}
}
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
goto cleanup;
}
rc = gVBoxAPI.UIMedium.Close(medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to close HardDisk"));
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf16);
settingsFilePath,
&machine);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open Machine, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open Machine"));
goto cleanup;
}
rc = gVBoxAPI.UIVirtualBox.RegisterMachine(data->vboxObj, machine);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to register Machine, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to register Machine"));
goto cleanup;
}
AccessMode_ReadWrite,
&medium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open HardDisk"));
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetId(medium, &parentiid);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to get hardDisk Id, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to get hardDisk Id"));
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
newLocation,
&newMedium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to create HardDisk, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to create HardDisk"));
goto cleanup;
}
VBOX_UTF16_FREE(formatUtf16);
rc = gVBoxAPI.UIMedium.GetId(newMedium, &iid);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to get medium uuid, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to get medium uuid"));
VIR_FREE(disk);
goto cleanup;
}
/* Closing the "fake" disk */
rc = gVBoxAPI.UIMedium.Close(newMedium);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to close the new medium, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to close the new medium"));
goto cleanup;
}
}
&aMediaSize,
&aMedia);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to unregister machine, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to unregister machine"));
goto cleanup;
}
VBOX_RELEASE(machine);
resultCodeUnion resultCode;
rc = gVBoxAPI.UIMedium.DeleteStorage(medium, &progress);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to delete medium, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to delete medium"));
goto cleanup;
}
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
settingsFilePathUtf16,
&machine);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open Machine, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to open Machine"));
goto cleanup;
}
rc = gVBoxAPI.UIVirtualBox.RegisterMachine(data->vboxObj, machine);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to register Machine, rc=%08x"),
- (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to register Machine"));
goto cleanup;
}
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of domains, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of domains"));
goto cleanup;
}
VBOX_IID_INITIALIZE(&iid);
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj, ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
- vboxReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"), (unsigned)rc);
+ vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Could not get list of machines"));
return ret;
}