libxl: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Michal Privoznik 2023-08-24 17:03:58 +02:00
parent 0e588509f2
commit e0420aeda5
3 changed files with 10 additions and 19 deletions

View File

@ -1284,8 +1284,7 @@ libxlMakeNic(virDomainDef *def,
if (l_nic->script && !(actual_type == VIR_DOMAIN_NET_TYPE_BRIDGE || if (l_nic->script && !(actual_type == VIR_DOMAIN_NET_TYPE_BRIDGE ||
actual_type == VIR_DOMAIN_NET_TYPE_ETHERNET)) { actual_type == VIR_DOMAIN_NET_TYPE_ETHERNET)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("specifying a script is only supported with " _("specifying a script is only supported with interface types bridge and ethernet"));
"interface types bridge and ethernet"));
return -1; return -1;
} }
@ -1310,8 +1309,7 @@ libxlMakeNic(virDomainDef *def,
def->os.type == VIR_DOMAIN_OSTYPE_XENPVH) && def->os.type == VIR_DOMAIN_OSTYPE_XENPVH) &&
l_nic->model != VIR_DOMAIN_NET_MODEL_NETFRONT) { l_nic->model != VIR_DOMAIN_NET_MODEL_NETFRONT) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("only model 'netfront' is supported for " _("only model 'netfront' is supported for Xen PV(H) domains"));
"Xen PV(H) domains"));
return -1; return -1;
} }
x_nic->model = g_strdup(virDomainNetGetModelString(l_nic)); x_nic->model = g_strdup(virDomainNetGetModelString(l_nic));
@ -1802,14 +1800,12 @@ libxlDriverConfigInit(libxlDriverConfig *cfg)
} }
if (libxl_ctx_alloc(&cfg->ctx, LIBXL_VERSION, 0, (xentoollog_logger *)cfg->logger)) { if (libxl_ctx_alloc(&cfg->ctx, LIBXL_VERSION, 0, (xentoollog_logger *)cfg->logger)) {
VIR_ERROR(_("cannot initialize libxenlight context, probably not " VIR_ERROR(_("cannot initialize libxenlight context, probably not running in a Xen Dom0, disabling driver"));
"running in a Xen Dom0, disabling driver"));
return -1; return -1;
} }
if ((cfg->verInfo = libxl_get_version_info(cfg->ctx)) == NULL) { if ((cfg->verInfo = libxl_get_version_info(cfg->ctx)) == NULL) {
VIR_ERROR(_("cannot version information from libxenlight, " VIR_ERROR(_("cannot version information from libxenlight, disabling driver"));
"disabling driver"));
return -1; return -1;
} }
cfg->version = (cfg->verInfo->xen_version_major * 1000000) + cfg->version = (cfg->verInfo->xen_version_major * 1000000) +

View File

@ -2904,8 +2904,7 @@ libxlDomainUndefineFlags(virDomainPtr dom,
} }
} else { } else {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Refusing to undefine while domain managed " _("Refusing to undefine while domain managed save image exists"));
"save image exists"));
goto cleanup; goto cleanup;
} }
} }
@ -3212,8 +3211,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivate *driver,
if (libxlDomainAttachControllerDevice(driver, vm, controller) < 0) { if (libxlDomainAttachControllerDevice(driver, vm, controller) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("No available USB controller and port, and " _("No available USB controller and port, and failed to attach a new one"));
"failed to attach a new one"));
virDomainControllerDefFree(controller); virDomainControllerDefFree(controller);
goto cleanup; goto cleanup;
} }

View File

@ -679,8 +679,7 @@ libxlDomainMigrationDstPrepare(virConnectPtr dconn,
if (STRPREFIX(hostname, "localhost")) { if (STRPREFIX(hostname, "localhost")) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("hostname on destination resolved to localhost," _("hostname on destination resolved to localhost, but migration requires an FQDN"));
" but migration requires an FQDN"));
goto endjob; goto endjob;
} }
@ -1142,8 +1141,7 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivate *driver,
if (useParams <= 0) { if (useParams <= 0) {
if (useParams == 0) if (useParams == 0)
virReportError(VIR_ERR_OPERATION_FAILED, "%s", virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Destination libvirt does not support migration" _("Destination libvirt does not support migration with extensible parameters"));
" with extensible parameters"));
goto cleanup; goto cleanup;
} }
@ -1260,9 +1258,8 @@ libxlDomainMigrationDstFinish(virConnectPtr dconn,
/* Check if domain is alive */ /* Check if domain is alive */
if (!virDomainObjIsActive(vm)) { if (!virDomainObjIsActive(vm)) {
/* Migration failed if domain is inactive */ /* Migration failed if domain is inactive */
virReportError(VIR_ERR_OPERATION_FAILED, virReportError(VIR_ERR_OPERATION_FAILED, "%s",
"%s", _("Migration failed. Domain is not running " _("Migration failed. Domain is not running on destination host"));
"on destination host"));
goto cleanup; goto cleanup;
} }