vbox: Move error messages onto a single line

Our coding style suggests error messages to be on a single line
for easier git grep. Since I'm touching them anyways, let's make
them follow our own suggestion.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Michal Privoznik 2023-01-21 11:07:31 +01:00
parent 3d8bd1fbe3
commit bde1890b63

View File

@ -527,8 +527,7 @@ vboxSetStorageController(virDomainControllerDef *controller,
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DC390: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DC390:
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AM53C974: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_AM53C974:
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("The vbox driver does not support %s SCSI " _("The vbox driver does not support %s SCSI controller model"),
"controller model"),
virDomainControllerModelSCSITypeToString(controller->model)); virDomainControllerModelSCSITypeToString(controller->model));
goto cleanup; goto cleanup;
case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_DEFAULT:
@ -571,8 +570,7 @@ vboxSetStorageController(virDomainControllerDef *controller,
if (NS_FAILED(rc)) { if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to add storage controller " _("Failed to add storage controller (name: %s, busType: %d), rc=%08x"),
"(name: %s, busType: %d), rc=%08x"),
debugName, vboxBusType, rc); debugName, vboxBusType, rc);
goto cleanup; goto cleanup;
} }
@ -583,8 +581,7 @@ vboxSetStorageController(virDomainControllerDef *controller,
vboxModel); vboxModel);
if (NS_FAILED(rc)) { if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to change storage controller model, " _("Failed to change storage controller model, rc=%08x"), rc);
"rc=%08x"), rc);
goto cleanup; goto cleanup;
} }
} }
@ -1167,8 +1164,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data, IMachine *machine)
if (type != VIR_STORAGE_TYPE_FILE) { if (type != VIR_STORAGE_TYPE_FILE) {
vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED, vboxReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported storage type %s, the only supported " _("Unsupported storage type %s, the only supported type is %s"),
"type is %s"),
virStorageTypeToString(type), virStorageTypeToString(type),
virStorageTypeToString(VIR_STORAGE_TYPE_FILE)); virStorageTypeToString(VIR_STORAGE_TYPE_FILE));
ret = -1; ret = -1;
@ -1274,8 +1270,8 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data, IMachine *machine)
if (!medium) { if (!medium) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to open the following disk/dvd/floppy " _("Failed to open the following disk/dvd/floppy to the machine: %s, rc=%08x"),
"to the machine: %s, rc=%08x"), src, rc); src, rc);
ret = -1; ret = -1;
goto cleanup; goto cleanup;
} }
@ -1283,8 +1279,7 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data, IMachine *machine)
rc = gVBoxAPI.UIMedium.GetId(medium, &mediumUUID); rc = gVBoxAPI.UIMedium.GetId(medium, &mediumUUID);
if (NS_FAILED(rc)) { if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Can't get the UUID of the file to be attached " _("Can't get the UUID of the file to be attached as harddisk/dvd/floppy: %s, rc=%08x"),
"as harddisk/dvd/floppy: %s, rc=%08x"),
src, rc); src, rc);
ret = -1; ret = -1;
goto cleanup; goto cleanup;
@ -1319,8 +1314,8 @@ vboxAttachDrives(virDomainDef *def, struct _vboxDriver *data, IMachine *machine)
if (NS_FAILED(rc)) { if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not attach the file as " _("Could not attach the file as harddisk/dvd/floppy: %s, rc=%08x"),
"harddisk/dvd/floppy: %s, rc=%08x"), src, rc); src, rc);
ret = -1; ret = -1;
goto cleanup; goto cleanup;
} else { } else {
@ -1989,8 +1984,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags
VIR_DIV_UP(def->mem.cur_balloon, 1024)); VIR_DIV_UP(def->mem.cur_balloon, 1024));
if (NS_FAILED(rc)) { if (NS_FAILED(rc)) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, 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: %llu Kb, rc=%08x"),
"rc=%08x"),
def->mem.cur_balloon, (unsigned)rc); def->mem.cur_balloon, (unsigned)rc);
} }
@ -2354,9 +2348,7 @@ static int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
ret = vboxStartMachine(dom, i, machine); ret = vboxStartMachine(dom, i, machine);
} else { } else {
vboxReportError(VIR_ERR_OPERATION_FAILED, "%s", vboxReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("machine is not in " _("machine is not in poweroff|saved|aborted state, so couldn't start it"));
"poweroff|saved|aborted state, so "
"couldn't start it"));
ret = -1; ret = -1;
} }
} }
@ -2838,8 +2830,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory)
ret = 0; ret = 0;
} else { } else {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("could not set the memory size of the " _("could not set the memory size of the domain to: %lu Kb, rc=%08x"),
"domain to: %lu Kb, rc=%08x"),
memory, (unsigned)rc); memory, (unsigned)rc);
} }
} }
@ -2994,8 +2985,7 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
ret = 0; ret = 0;
} else { } else {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("could not set the number of cpus of the domain " _("could not set the number of cpus of the domain to: %u, rc=%08x"),
"to: %u, rc=%08x"),
CPUCount, (unsigned)rc); CPUCount, (unsigned)rc);
} }
VBOX_RELEASE(machine); VBOX_RELEASE(machine);
@ -3406,8 +3396,8 @@ vboxDumpDisks(virDomainDef *def, struct _vboxDriver *data, IMachine *machine)
if (!disk->dst) { if (!disk->dst) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not generate medium name for the disk " _("Could not generate medium name for the disk at: port:%d, slot:%d"),
"at: port:%d, slot:%d"), devicePort, deviceSlot); devicePort, deviceSlot);
goto cleanup; goto cleanup;
} }
@ -4721,8 +4711,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
* read-write disk number */ * read-write disk number */
if (realReadOnlyDisksPathSize < realReadWriteDisksPathSize) { if (realReadOnlyDisksPathSize < realReadWriteDisksPathSize) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s", vboxReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("The read only disk number must be greater or equal to the " _("The read only disk number must be greater or equal to the read write disk number"));
" read write disk number"));
goto cleanup; goto cleanup;
} }
for (it = 0; it < realReadWriteDisksPathSize; it++) { for (it = 0; it < realReadWriteDisksPathSize; it++) {
@ -6105,8 +6094,7 @@ vboxSnapshotGetReadOnlyDisks(virDomainSnapshotDef *def,
sdCount); sdCount);
if (!defdom->disks[diskCount]->dst) { if (!defdom->disks[diskCount]->dst) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not generate medium name for the disk " _("Could not generate medium name for the disk at: port:%d, slot:%d"), devicePort, deviceSlot);
"at: port:%d, slot:%d"), devicePort, deviceSlot);
ret = -1; ret = -1;
goto cleanup; goto cleanup;
} }
@ -7391,8 +7379,7 @@ vboxDomainScreenshot(virDomainPtr dom,
if (screen >= max_screen) { if (screen >= max_screen) {
vboxReportError(VIR_ERR_INVALID_ARG, vboxReportError(VIR_ERR_INVALID_ARG,
_("screen ID higher than monitor " _("screen ID higher than monitor count (%d)"), max_screen);
"count (%d)"), max_screen);
VBOX_RELEASE(machine); VBOX_RELEASE(machine);
return NULL; return NULL;
} }
@ -7814,8 +7801,7 @@ vboxDomainSendKey(virDomainPtr dom,
keyDownCodes[i]); keyDownCodes[i]);
if (keycode < 0) { if (keycode < 0) {
vboxReportError(VIR_ERR_INTERNAL_ERROR, vboxReportError(VIR_ERR_INTERNAL_ERROR,
_("cannot translate keycode %u of %s codeset to" _("cannot translate keycode %u of %s codeset to xt keycode"),
" xt keycode"),
keyDownCodes[i], keyDownCodes[i],
virKeycodeSetTypeToString(codeset)); virKeycodeSetTypeToString(codeset));
goto cleanup; goto cleanup;