]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: Move error messages onto a single line
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 4 Sep 2023 07:35:36 +0000 (09:35 +0200)
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>
18 files changed:
src/util/vircgroupv2devices.c
src/util/vircommand.c
src/util/virfile.c
src/util/virhostcpu.c
src/util/virhostmem.c
src/util/virjson.c
src/util/virmdev.c
src/util/virnetdev.c
src/util/virnetdevbandwidth.c
src/util/virnetdevopenvswitch.c
src/util/virnetdevvportprofile.c
src/util/virnetlink.c
src/util/virnuma.c
src/util/virpci.c
src/util/virprocess.c
src/util/virqemu.c
src/util/virresctrl.c
src/util/virthreadpool.c

index f740127bbc511a18f8a45078703814f9eb29e35c..7deb233c065ae39635ddb790dce8308ce89dff5d 100644 (file)
@@ -444,9 +444,7 @@ virCgroupV2DevicesCreateMap(size_t size)
     if (mapfd < 0) {
         if (errno == EPERM) {
             virReportSystemError(errno, "%s",
-                                 _("failed to initialize device BPF map; "
-                                   "locked memory limit for libvirtd probably "
-                                   "needs to be raised"));
+                                 _("failed to initialize device BPF map; locked memory limit for libvirtd probably needs to be raised"));
             return -1;
         } else {
             virReportSystemError(errno, "%s",
@@ -595,8 +593,7 @@ int
 virCgroupV2DevicesDetectProg(virCgroup *group G_GNUC_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("cgroups v2 BPF devices not supported "
-                           "with this kernel"));
+                         _("cgroups v2 BPF devices not supported with this kernel"));
     return -1;
 }
 
@@ -605,8 +602,7 @@ int
 virCgroupV2DevicesCreateProg(virCgroup *group G_GNUC_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("cgroups v2 BPF devices not supported "
-                           "with this kernel"));
+                         _("cgroups v2 BPF devices not supported with this kernel"));
     return -1;
 }
 
@@ -615,8 +611,7 @@ int
 virCgroupV2DevicesPrepareProg(virCgroup *group G_GNUC_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("cgroups v2 BPF devices not supported "
-                           "with this kernel"));
+                         _("cgroups v2 BPF devices not supported with this kernel"));
     return -1;
 }
 
index 5f094c625a4063eafe7cae3fddd3276be340b2c5..704069815aac26718d89f031c303350e28629a6b 100644 (file)
@@ -2691,8 +2691,7 @@ virCommandRunAsync(virCommand *cmd, pid_t *pid)
                                 virCommandDoAsyncIOHelper,
                                 "cmd-async-io", false, cmd) < 0) {
             virReportSystemError(errno, "%s",
-                                 _("Unable to create thread "
-                                   "to process command's IO"));
+                                 _("Unable to create thread to process command's IO"));
             VIR_FREE(cmd->asyncioThread);
             virCommandAbort(cmd);
             ret = -1;
index 0600e4a172494c3504ac6ec45cb86c4b47ee683b..bd36a9a31ad4c365215c1e0f33df871bc670c8ea 100644 (file)
@@ -1094,8 +1094,7 @@ virFileNBDLoadDriver(void)
 {
     if (virKModIsProhibited(NBD_DRIVER)) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Failed to load nbd module: "
-                         "administratively prohibited"));
+                       _("Failed to load nbd module: administratively prohibited"));
         return false;
     } else {
         g_autofree char *errbuf = NULL;
index a15731e9ea189b89d733942b4fd0b7622dc89afb..0389012ef7108d546df25c87f690ba84c29a819e 100644 (file)
@@ -892,8 +892,7 @@ virHostCPUStatsAssign(virNodeCPUStatsPtr param,
 {
     if (virStrcpyStatic(param->field, name) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("kernel cpu time field is too long"
-                               " for the destination"));
+                       "%s", _("kernel cpu time field is too long for the destination"));
         return -1;
     }
     param->value = value;
index 83c10206cd87d467ab36e3a31cd87da8b2cc39ac..1da2759ac3553e8ef43b946c38fc04a78bbfbe20 100644 (file)
@@ -392,8 +392,7 @@ virHostMemSetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
     virCheckFlags(0, -1);
 
     virReportError(VIR_ERR_NO_SUPPORT, "%s",
-                   _("node set memory parameters not implemented"
-                     " on this platform"));
+                   _("node set memory parameters not implemented on this platform"));
     return -1;
 }
 #endif
@@ -586,8 +585,7 @@ virHostMemGetParameters(virTypedParameterPtr params G_GNUC_UNUSED,
     virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1);
 
     virReportError(VIR_ERR_NO_SUPPORT, "%s",
-                   _("node get memory parameters not implemented"
-                     " on this platform"));
+                   _("node get memory parameters not implemented on this platform"));
     return -1;
 }
 #endif
index 7e20443f933cb1a314290ea996408200dcf1011e..03c3b6cfb9e60c7b16eaf3234c166bc5cc2c0c17 100644 (file)
@@ -1938,8 +1938,7 @@ virJSONValueObjectDeflattenWorker(const char *key,
     } else {
         if (!virJSONValueIsObject(existobj)) {
             virReportError(VIR_ERR_INVALID_ARG, "%s",
-                           _("mixing nested objects and values is forbidden in "
-                             "JSON deflattening"));
+                           _("mixing nested objects and values is forbidden in JSON deflattening"));
             return -1;
         }
     }
index d0f35ca34713c8b6f7f9df821fda1616c5451110..992f3eb1b74c57c8dfdcaf2d648125ad0601b605 100644 (file)
@@ -167,8 +167,7 @@ virMediatedDeviceNew(const char *uuidstr G_GNUC_UNUSED,
                      virMediatedDeviceModelType model G_GNUC_UNUSED)
 {
     virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                   _("mediated devices are not supported on non-linux "
-                     "platforms"));
+                   _("mediated devices are not supported on non-linux platforms"));
     return NULL;
 }
 
index 46d90fbd7655e726da1ac565cb3e181a48f5033c..8ae854245ed99dc1a3aa4c225b614ddbb449caf8 100644 (file)
@@ -182,8 +182,7 @@ virNetDevSetupControl(const char *ifname G_GNUC_UNUSED,
                       void *ifr G_GNUC_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("Network device configuration is not supported "
-                           "on this platform"));
+                         _("Network device configuration is not supported on this platform"));
     return -1;
 }
 #endif /* WITH_STRUCT_IFREQ */
@@ -2248,8 +2247,7 @@ virNetDevSetNetConfig(const char *linkdev, int vf,
         if (vlan) {
             if (vlan->nTags != 1 || vlan->trunk) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("vlan trunking is not supported "
-                                 "by SR-IOV network devices"));
+                               _("vlan trunking is not supported by SR-IOV network devices"));
                 return -1;
             }
 
@@ -2651,8 +2649,7 @@ int virNetDevAddMulti(const char *ifname G_GNUC_UNUSED,
                       virMacAddr *macaddr G_GNUC_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("Unable to add address to interface "
-                           "multicast list on this platform"));
+                         _("Unable to add address to interface multicast list on this platform"));
     return -1;
 }
 #endif
@@ -2696,8 +2693,7 @@ int virNetDevDelMulti(const char *ifname G_GNUC_UNUSED,
                       virMacAddr *macaddr G_GNUC_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("Unable to delete address from interface "
-                           "multicast list on this platform"));
+                         _("Unable to delete address from interface multicast list on this platform"));
     return -1;
 }
 #endif
index 52fb94a9fc374379b1bab04ce2a44e1202d87890..ec41666f67b66a4b0e55d14304599ee243acf2f1 100644 (file)
@@ -208,15 +208,13 @@ virNetDevBandwidthSet(const char *ifname,
 
     if (geteuid() != 0) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                       _("Network bandwidth tuning is not available"
-                         " in session mode"));
+                       _("Network bandwidth tuning is not available in session mode"));
         return -1;
     }
 
     if (!ifname) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                       _("Unable to set bandwidth for interface because "
-                         "device name is unknown"));
+                       _("Unable to set bandwidth for interface because device name is unknown"));
         return -1;
     }
 
index dbdd645f8ea4cc3b9ef3017a3c8585f6abfee58f..8dad6ed2bd26a4047feb7db683e794b457d53a87 100644 (file)
@@ -894,15 +894,13 @@ virNetDevOpenvswitchInterfaceSetQos(const char *ifname,
 
     if (geteuid() != 0) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                       _("Network bandwidth tuning is not available"
-                         " in session mode"));
+                       _("Network bandwidth tuning is not available in session mode"));
         return -1;
     }
 
     if (!ifname) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                       _("Unable to set bandwidth for interface because "
-                         "device name is unknown"));
+                       _("Unable to set bandwidth for interface because device name is unknown"));
         return -1;
     }
 
index cf92f1838bab5191d29ea64f1c3a04564ccba17d..33bcd350c493d771f11fe83e28ff723658e77528 100644 (file)
@@ -530,8 +530,7 @@ virNetDevVPortProfileGetStatus(struct nlattr **tb, int32_t vf,
 
                 if (nla_type(tb_vf_ports) != IFLA_VF_PORT) {
                     virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                                   _("error while iterating over "
-                                     "IFLA_VF_PORTS part"));
+                                   _("error while iterating over IFLA_VF_PORTS part"));
                     return -1;
                 }
 
@@ -584,8 +583,7 @@ virNetDevVPortProfileGetStatus(struct nlattr **tb, int32_t vf,
                     if (nla_parse_nested(tb_port, IFLA_PORT_MAX, tb_vf_ports,
                                          ifla_port_policy)) {
                         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                                       _("error parsing IFLA_VF_PORT "
-                                         "during error reporting"));
+                                       _("error parsing IFLA_VF_PORT during error reporting"));
                         return -1;
                     }
                     if (tb_port[IFLA_PORT_INSTANCE_UUID]) {
index 2d052cd03ec764cc0a0d6cc34efb8fe12396dce8..24cd69a3857c87172560e7147ff0540c6d81a8e2 100644 (file)
@@ -225,8 +225,7 @@ virNetlinkCreateSocket(int protocol)
 
     if (virNetlinkSetBufferSize(nlhandle, 131702, 0) < 0) {
         virReportSystemError(errno, "%s",
-                             _("cannot set netlink socket buffer "
-                               "size to 128k"));
+                             _("cannot set netlink socket buffer size to 128k"));
         goto error;
     }
     nl_socket_enable_msg_peek(nlhandle);
index e8bbaf0947c8a12c73d8def39068eac8dd348f69..5053a70c61b3a3347c7d11119b721e3c9724868e 100644 (file)
@@ -69,8 +69,7 @@ virNumaGetAutoPlacementAdvice(unsigned short vcpus,
 
     if (virCommandRun(cmd, NULL) < 0) {
         virReportError(VIR_ERR_OPERATION_FAILED, "%s",
-                       _("Failed to query numad for the "
-                         "advisory nodeset"));
+                       _("Failed to query numad for the advisory nodeset"));
         VIR_FREE(output);
     }
 
@@ -149,8 +148,7 @@ virNumaSetupMemoryPolicy(virDomainNumatuneMemMode mode,
 
         if (!has_preferred_many && nnodes != 1) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           "%s", _("NUMA memory tuning in 'preferred' mode "
-                                   "only supports single node"));
+                           "%s", _("NUMA memory tuning in 'preferred' mode only supports single node"));
             return -1;
         }
 
index 1158e468bf989896cdde1018b7e1f4055a94122e..08b82708b14ea7809df86d64d15596073b8f4473 100644 (file)
@@ -1454,8 +1454,7 @@ virPCIDeviceAddressIsValid(virPCIDeviceAddress *addr,
     if (virPCIDeviceAddressIsEmpty(addr)) {
         if (report)
             virReportError(VIR_ERR_XML_ERROR, "%s",
-                           _("Invalid PCI address 0000:00:00, at least "
-                             "one of domain, bus, or slot must be > 0"));
+                           _("Invalid PCI address 0000:00:00, at least one of domain, bus, or slot must be > 0"));
         return false;
     }
     return true;
index 6ed2ac86fd8826a29cc370f64d885161db6b1eae..31b833e5c8f2a2ea53f71dca6b3dc20e7de48531 100644 (file)
@@ -1638,15 +1638,13 @@ virProcessSetScheduler(pid_t pid,
 
         if ((min = sched_get_priority_min(pol)) < 0) {
             virReportSystemError(errno, "%s",
-                                 _("Cannot get minimum scheduler "
-                                   "priority value"));
+                                 _("Cannot get minimum scheduler priority value"));
             return -1;
         }
 
         if ((max = sched_get_priority_max(pol)) < 0) {
             virReportSystemError(errno, "%s",
-                                 _("Cannot get maximum scheduler "
-                                   "priority value"));
+                                 _("Cannot get maximum scheduler priority value"));
             return -1;
         }
 
@@ -1681,8 +1679,7 @@ virProcessSetScheduler(pid_t pid G_GNUC_UNUSED,
         return 0;
 
     virReportSystemError(ENOSYS, "%s",
-                         _("Process CPU scheduling is not supported "
-                           "on this platform"));
+                         _("Process CPU scheduling is not supported on this platform"));
     return -1;
 }
 
index b9e57a6f4c090eaf88dbf2c103bbf4d04b263515..c9fac5956a28d2b938b5ca521305c7bbca7e1b91 100644 (file)
@@ -207,8 +207,7 @@ virQEMUBuildCommandLineJSONRecurse(const char *key,
     case VIR_JSON_TYPE_ARRAY:
         if (nested) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("nested JSON array to commandline conversion is "
-                             "not supported"));
+                           _("nested JSON array to commandline conversion is not supported"));
             return -1;
         }
 
index 1e98b111f2ddc6b3f003494b4ae4618d49731cf5..8ca58f5d105000860c380d323e09c74bd0a8953b 100644 (file)
@@ -496,8 +496,7 @@ static int
 virResctrlLock(void)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("resctrl locking is not supported "
-                           "on this platform"));
+                         _("resctrl locking is not supported on this platform"));
     return -1;
 }
 
@@ -506,8 +505,7 @@ static int
 virResctrlUnlock(int fd G_GNUC_UNUSED)
 {
     virReportSystemError(ENOSYS, "%s",
-                         _("resctrl locking is not supported "
-                           "on this platform"));
+                         _("resctrl locking is not supported on this platform"));
     return -1;
 }
 
@@ -1468,8 +1466,7 @@ virResctrlAllocParseMemoryBandwidthLine(virResctrlInfo *resctrl,
         !resctrl->membw_info->min_bandwidth ||
         !resctrl->membw_info->bandwidth_granularity) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Missing or inconsistent resctrl info for "
-                         "memory bandwidth allocation"));
+                       _("Missing or inconsistent resctrl info for memory bandwidth allocation"));
         return -1;
     }
 
index 2f1d49d66594585f9dbac6e087547e394b73ddb9..d45fa920613d16084d0cd65323a74e2a44794210 100644 (file)
@@ -429,8 +429,7 @@ virThreadPoolSetParameters(virThreadPool *pool,
     if ((maxWorkers == 0 && pool->maxWorkers > 0) ||
         (maxWorkers > 0 && pool->maxWorkers == 0)) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("maxWorkers must not be switched from zero to non-zero"
-                         " and vice versa"));
+                       _("maxWorkers must not be switched from zero to non-zero and vice versa"));
         return -1;
     }