From nobody Mon Feb 9 09:34:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1692949448; cv=none; d=zohomail.com; s=zohoarc; b=DSU0mEDux+M+y4ZzYAd6ihVEgWtF/3mmkF61jSVaVDFc3Lz0+9sN1pIV9UkFElS2157APNDFC9iZQICNNtjTO3FTJRREYBCA86B6nAHcGst2a25Upns+BehqUwjKx32qUP2Lp4CBvklIyHcmrpKSZZ3mkgn7L9fEHcKRf4dPeUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692949448; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AjMaQ9pV56wcSCc8IxrBaQqDRp758RX/aDox7Hsy0lA=; b=UzNK41kxUG9Z2rRgnkenZxuV1anRN9oDaw+zB9JxAV6hk+8G75OZ1oUs70hXl+VGo+EWuoQaJ5xTPFL0BsifcY2DkFpUG34XZCY94kDSb2QmW+Ydbs9dZ0EjB2xXz8POeUqawbO955hpOoY9PmgGuKq+XzhMnCJiVnw74oBpxEo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1692949448371137.10266711353324; Fri, 25 Aug 2023 00:44:08 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-564-HXi2AVb3NkinUVydvpw-OA-1; Fri, 25 Aug 2023 03:40:54 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7694885D52F; Fri, 25 Aug 2023 07:40:42 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5357240D2841; Fri, 25 Aug 2023 07:40:42 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 166ED19465BD; Fri, 25 Aug 2023 07:40:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2ABA91946589 for ; Fri, 25 Aug 2023 07:40:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1D0712026D68; Fri, 25 Aug 2023 07:40:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id B80772026FFE for ; Fri, 25 Aug 2023 07:40:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692949447; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=AjMaQ9pV56wcSCc8IxrBaQqDRp758RX/aDox7Hsy0lA=; b=GfzHZYA6qKHUP5K9VnOhZGOH3EurqO7bIB7hIYQtjr+8cFQeXtL/fpXdmGAdYyUYG/flhM 3NCJRHlaLlIdY/0mBk8dgu1gZ++QwZ0kzypgkw/5eHwn8J7fSpJFxpOHCWBlYZHnTdAZbm InzcNffj5WmrQM3BoK+pgetT5baheAQ= X-MC-Unique: HXi2AVb3NkinUVydvpw-OA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 21/27] util: Move error messages onto a single line Date: Fri, 25 Aug 2023 09:40:18 +0200 Message-ID: <621f318e8d73988dfe4edc0a00b319a9b4e83ac8.1692949012.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1692949449674100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Error messages are exempt from the 80 columns rule. Move them onto one line. Signed-off-by: Michal Privoznik --- src/util/vircgroupv2devices.c | 13 ++++--------- src/util/vircommand.c | 3 +-- src/util/virfile.c | 3 +-- src/util/virhostcpu.c | 3 +-- src/util/virhostmem.c | 6 ++---- src/util/virjson.c | 3 +-- src/util/virmdev.c | 3 +-- src/util/virnetdev.c | 12 ++++-------- src/util/virnetdevbandwidth.c | 6 ++---- src/util/virnetdevopenvswitch.c | 6 ++---- src/util/virnetdevvportprofile.c | 6 ++---- src/util/virnetlink.c | 3 +-- src/util/virnuma.c | 6 ++---- src/util/virpci.c | 3 +-- src/util/virprocess.c | 9 +++------ src/util/virqemu.c | 3 +-- src/util/virresctrl.c | 9 +++------ src/util/virthreadpool.c | 3 +-- 18 files changed, 33 insertions(+), 67 deletions(-) diff --git a/src/util/vircgroupv2devices.c b/src/util/vircgroupv2devices.c index f740127bbc..7deb233c06 100644 --- a/src/util/vircgroupv2devices.c +++ b/src/util/vircgroupv2devices.c @@ -444,9 +444,7 @@ virCgroupV2DevicesCreateMap(size_t size) if (mapfd < 0) { if (errno =3D=3D EPERM) { virReportSystemError(errno, "%s", - _("failed to initialize device BPF map; " - "locked memory limit for libvirtd proba= bly " - "needs to be raised")); + _("failed to initialize device BPF map; l= ocked 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; } =20 @@ -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; } =20 @@ -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; } =20 diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 5f094c625a..704069815a 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -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 com= mand's IO")); VIR_FREE(cmd->asyncioThread); virCommandAbort(cmd); ret =3D -1; diff --git a/src/util/virfile.c b/src/util/virfile.c index 0600e4a172..bd36a9a31a 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -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 proh= ibited")); return false; } else { g_autofree char *errbuf =3D NULL; diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index a15731e9ea..0389012ef7 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -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 =3D value; diff --git a/src/util/virhostmem.c b/src/util/virhostmem.c index 83c10206cd..1da2759ac3 100644 --- a/src/util/virhostmem.c +++ b/src/util/virhostmem.c @@ -392,8 +392,7 @@ virHostMemSetParameters(virTypedParameterPtr params G_G= NUC_UNUSED, virCheckFlags(0, -1); =20 virReportError(VIR_ERR_NO_SUPPORT, "%s", - _("node set memory parameters not implemented" - " on this platform")); + _("node set memory parameters not implemented on this p= latform")); return -1; } #endif @@ -586,8 +585,7 @@ virHostMemGetParameters(virTypedParameterPtr params G_G= NUC_UNUSED, virCheckFlags(VIR_TYPED_PARAM_STRING_OKAY, -1); =20 virReportError(VIR_ERR_NO_SUPPORT, "%s", - _("node get memory parameters not implemented" - " on this platform")); + _("node get memory parameters not implemented on this p= latform")); return -1; } #endif diff --git a/src/util/virjson.c b/src/util/virjson.c index 7e20443f93..03c3b6cfb9 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -1938,8 +1938,7 @@ virJSONValueObjectDeflattenWorker(const char *key, } else { if (!virJSONValueIsObject(existobj)) { virReportError(VIR_ERR_INVALID_ARG, "%s", - _("mixing nested objects and values is forbidde= n in " - "JSON deflattening")); + _("mixing nested objects and values is forbidde= n in JSON deflattening")); return -1; } } diff --git a/src/util/virmdev.c b/src/util/virmdev.c index d0f35ca347..992f3eb1b7 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -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 plat= forms")); return NULL; } =20 diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 46d90fbd76..8ae854245e 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -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 !=3D 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; } =20 @@ -2651,8 +2649,7 @@ int virNetDevAddMulti(const char *ifname G_GNUC_UNUSE= D, 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 l= ist on this platform")); return -1; } #endif @@ -2696,8 +2693,7 @@ int virNetDevDelMulti(const char *ifname G_GNUC_UNUSE= D, 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 multic= ast list on this platform")); return -1; } #endif diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c index 52fb94a9fc..ec41666f67 100644 --- a/src/util/virnetdevbandwidth.c +++ b/src/util/virnetdevbandwidth.c @@ -208,15 +208,13 @@ virNetDevBandwidthSet(const char *ifname, =20 if (geteuid() !=3D 0) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("Network bandwidth tuning is not available" - " in session mode")); + _("Network bandwidth tuning is not available in ses= sion mode")); return -1; } =20 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 de= vice name is unknown")); return -1; } =20 diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index dbdd645f8e..8dad6ed2bd 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -894,15 +894,13 @@ virNetDevOpenvswitchInterfaceSetQos(const char *ifnam= e, =20 if (geteuid() !=3D 0) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", - _("Network bandwidth tuning is not available" - " in session mode")); + _("Network bandwidth tuning is not available in ses= sion mode")); return -1; } =20 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 de= vice name is unknown")); return -1; } =20 diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprof= ile.c index cf92f1838b..33bcd350c4 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -530,8 +530,7 @@ virNetDevVPortProfileGetStatus(struct nlattr **tb, int3= 2_t vf, =20 if (nla_type(tb_vf_ports) !=3D IFLA_VF_PORT) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("error while iterating over " - "IFLA_VF_PORTS part")); + _("error while iterating over IFLA_VF_P= ORTS part")); return -1; } =20 @@ -584,8 +583,7 @@ virNetDevVPortProfileGetStatus(struct nlattr **tb, int3= 2_t vf, if (nla_parse_nested(tb_port, IFLA_PORT_MAX, tb_vf_por= ts, ifla_port_policy)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("error parsing IFLA_VF_PORT " - "during error reporting")); + _("error parsing IFLA_VF_PORT durin= g error reporting")); return -1; } if (tb_port[IFLA_PORT_INSTANCE_UUID]) { diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 2d052cd03e..24cd69a385 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -225,8 +225,7 @@ virNetlinkCreateSocket(int protocol) =20 if (virNetlinkSetBufferSize(nlhandle, 131702, 0) < 0) { virReportSystemError(errno, "%s", - _("cannot set netlink socket buffer " - "size to 128k")); + _("cannot set netlink socket buffer size to 1= 28k")); goto error; } nl_socket_enable_msg_peek(nlhandle); diff --git a/src/util/virnuma.c b/src/util/virnuma.c index e8bbaf0947..5053a70c61 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -69,8 +69,7 @@ virNumaGetAutoPlacementAdvice(unsigned short vcpus, =20 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); } =20 @@ -149,8 +148,7 @@ virNumaSetupMemoryPolicy(virDomainNumatuneMemMode mode, =20 if (!has_preferred_many && nnodes !=3D 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; } =20 diff --git a/src/util/virpci.c b/src/util/virpci.c index 1158e468bf..08b82708b1 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -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; diff --git a/src/util/virprocess.c b/src/util/virprocess.c index f8daa786c9..7c0f63efbb 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -1621,15 +1621,13 @@ virProcessSetScheduler(pid_t pid, =20 if ((min =3D sched_get_priority_min(pol)) < 0) { virReportSystemError(errno, "%s", - _("Cannot get minimum scheduler " - "priority value")); + _("Cannot get minimum scheduler priority = value")); return -1; } =20 if ((max =3D sched_get_priority_max(pol)) < 0) { virReportSystemError(errno, "%s", - _("Cannot get maximum scheduler " - "priority value")); + _("Cannot get maximum scheduler priority = value")); return -1; } =20 @@ -1664,8 +1662,7 @@ virProcessSetScheduler(pid_t pid G_GNUC_UNUSED, return 0; =20 virReportSystemError(ENOSYS, "%s", - _("Process CPU scheduling is not supported " - "on this platform")); + _("Process CPU scheduling is not supported on thi= s platform")); return -1; } =20 diff --git a/src/util/virqemu.c b/src/util/virqemu.c index b9e57a6f4c..c9fac5956a 100644 --- a/src/util/virqemu.c +++ b/src/util/virqemu.c @@ -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; } =20 diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 1e98b111f2..8ca58f5d10 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -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 platf= orm")); return -1; } =20 @@ -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 platf= orm")); return -1; } =20 @@ -1468,8 +1466,7 @@ virResctrlAllocParseMemoryBandwidthLine(virResctrlInf= o *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; } =20 diff --git a/src/util/virthreadpool.c b/src/util/virthreadpool.c index 2f1d49d665..d45fa92061 100644 --- a/src/util/virthreadpool.c +++ b/src/util/virthreadpool.c @@ -429,8 +429,7 @@ virThreadPoolSetParameters(virThreadPool *pool, if ((maxWorkers =3D=3D 0 && pool->maxWorkers > 0) || (maxWorkers > 0 && pool->maxWorkers =3D=3D 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; } =20 --=20 2.41.0