[PATCH 07/27] libxl: Move error messages onto a single line

Michal Privoznik mprivozn at redhat.com
Fri Aug 25 07:40:04 UTC 2023


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

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/libxl/libxl_conf.c      | 12 ++++--------
 src/libxl/libxl_driver.c    |  6 ++----
 src/libxl/libxl_migration.c | 11 ++++-------
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 14ad320023..3ffb46fddd 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1284,8 +1284,7 @@ libxlMakeNic(virDomainDef *def,
     if (l_nic->script && !(actual_type == VIR_DOMAIN_NET_TYPE_BRIDGE ||
                            actual_type == VIR_DOMAIN_NET_TYPE_ETHERNET)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("specifying a script is only supported with "
-                         "interface types bridge and ethernet"));
+                       _("specifying a script is only supported with interface types bridge and ethernet"));
         return -1;
     }
 
@@ -1310,8 +1309,7 @@ libxlMakeNic(virDomainDef *def,
             def->os.type == VIR_DOMAIN_OSTYPE_XENPVH) &&
             l_nic->model != VIR_DOMAIN_NET_MODEL_NETFRONT) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("only model 'netfront' is supported for "
-                             "Xen PV(H) domains"));
+                           _("only model 'netfront' is supported for Xen PV(H) domains"));
             return -1;
         }
         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)) {
-        VIR_ERROR(_("cannot initialize libxenlight context, probably not "
-                    "running in a Xen Dom0, disabling driver"));
+        VIR_ERROR(_("cannot initialize libxenlight context, probably not running in a Xen Dom0, disabling driver"));
         return -1;
     }
 
     if ((cfg->verInfo = libxl_get_version_info(cfg->ctx)) == NULL) {
-        VIR_ERROR(_("cannot version information from libxenlight, "
-                    "disabling driver"));
+        VIR_ERROR(_("cannot version information from libxenlight, disabling driver"));
         return -1;
     }
     cfg->version = (cfg->verInfo->xen_version_major * 1000000) +
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 079922dd32..c8ca903050 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2904,8 +2904,7 @@ libxlDomainUndefineFlags(virDomainPtr dom,
             }
         } else {
             virReportError(VIR_ERR_OPERATION_INVALID, "%s",
-                           _("Refusing to undefine while domain managed "
-                             "save image exists"));
+                           _("Refusing to undefine while domain managed save image exists"));
             goto cleanup;
         }
     }
@@ -3212,8 +3211,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivate *driver,
 
         if (libxlDomainAttachControllerDevice(driver, vm, controller) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("No available USB controller and port, and "
-                             "failed to attach a new one"));
+                           _("No available USB controller and port, and failed to attach a new one"));
             virDomainControllerDefFree(controller);
             goto cleanup;
         }
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index a91091f5e8..f5dee7627b 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -679,8 +679,7 @@ libxlDomainMigrationDstPrepare(virConnectPtr dconn,
 
         if (STRPREFIX(hostname, "localhost")) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("hostname on destination resolved to localhost,"
-                             " but migration requires an FQDN"));
+                           _("hostname on destination resolved to localhost, but migration requires an FQDN"));
             goto endjob;
         }
 
@@ -1142,8 +1141,7 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivate *driver,
     if (useParams <= 0) {
         if (useParams == 0)
             virReportError(VIR_ERR_OPERATION_FAILED, "%s",
-                           _("Destination libvirt does not support migration"
-                             " with extensible parameters"));
+                           _("Destination libvirt does not support migration with extensible parameters"));
         goto cleanup;
     }
 
@@ -1260,9 +1258,8 @@ libxlDomainMigrationDstFinish(virConnectPtr dconn,
     /* Check if domain is alive */
     if (!virDomainObjIsActive(vm)) {
         /* Migration failed if domain is inactive */
-        virReportError(VIR_ERR_OPERATION_FAILED,
-                       "%s", _("Migration failed. Domain is not running "
-                               "on destination host"));
+        virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+                       _("Migration failed. Domain is not running on destination host"));
         goto cleanup;
     }
 
-- 
2.41.0



More information about the libvir-list mailing list