From nobody Mon Feb 9 02:51:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1657188451; cv=none; d=zohomail.com; s=zohoarc; b=W4Sjy5MavvAi0vjywxISnfa1o4PCPKYslU/oZQvhI7zuqj+3yf7RF6F+fUWm+5k3wIvS0yZRlC5C5kAPEQs7Y5RJq0px7XkP7tWmmKGBocwFeJ98sWfwREowtmynqsUtzhUUsqYmMryxyKqM3eD0ZTvva4PYfCgCOjiw3UweBTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657188451; 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=pkR4dTucfzVsXhJCjA09bYQTWE5ZaPFlLRg3qdwQ20Q=; b=VFdFlbq4FwqMX7AkvUU44bOB1pR6s2KhuNCG3YBfxUSPRCZ0twLATM10v4ipRQALX0O34wCuUao8UK8FeZyUMC0hY1oaabmjMfnvKRVVGjtIIeycBF6SrpJlvvmCWWmZtDRUXX/uG6JksHMlaXk0Zna+0tnCI9oFUv+Q/xOVBMA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 165718845197751.45182740590144; Thu, 7 Jul 2022 03:07:31 -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-644-9RbZWBADN9e_LyuKb7ApMg-1; Thu, 07 Jul 2022 06:07:24 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2BB21851784; Thu, 7 Jul 2022 10:07:20 +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 AE3CC2166B2A; Thu, 7 Jul 2022 10:07:19 +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 4E9DB1947B97; Thu, 7 Jul 2022 10:07:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4F3511947076 for ; Thu, 7 Jul 2022 10:07:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3F5D7C28129; Thu, 7 Jul 2022 10:07:13 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD07EC2811A for ; Thu, 7 Jul 2022 10:07:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657188448; 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=pkR4dTucfzVsXhJCjA09bYQTWE5ZaPFlLRg3qdwQ20Q=; b=SjqbOGNwa8nK2paERLOaob4v9LH9+h2OMjAS3gTmpMPJwVG+LKDeGsWqsPtttOZ5s/cpGK LEm7RkyFjiL/Udh9JAsVYmEmSVLQHn4IjQDbOiDEijz5Ve+q/BgM1YzX0Y4enzy9jzN/Mw RFXgbHttf3oGNq0z/aYOcQYFgXYvrIc= X-MC-Unique: 9RbZWBADN9e_LyuKb7ApMg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/3] domain_postparse: Move error messages onto single line Date: Thu, 7 Jul 2022 12:07:09 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1657188453917100002 Content-Type: text/plain; charset="utf-8"; x-default="true" Our coding style suggests 80 chars per line with error messages being exception (for easier git-grep). Apply this exception onto the newly created domain_postparse.c file. Signed-off-by: Michal Privoznik --- src/conf/domain_postparse.c | 49 ++++++++++++------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c index 18f06dcca8..df59de2d0d 100644 --- a/src/conf/domain_postparse.c +++ b/src/conf/domain_postparse.c @@ -57,16 +57,14 @@ virDomainDefPostParseMemory(virDomainDef *def, * properly. */ if (hotplugMemory > def->mem.total_memory) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("Total size of memory devices exceeds the tot= al " - "memory size")); + _("Total size of memory devices exceeds the tot= al memory size")); return -1; } } =20 if (virDomainDefGetMemoryInitial(def) =3D=3D 0) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("Memory size must be specified via or in= the " - " configuration")); + _("Memory size must be specified via or in= the configuration")); return -1; } =20 @@ -77,16 +75,14 @@ virDomainDefPostParseMemory(virDomainDef *def, if ((def->mem.max_memory || def->mem.memory_slots) && !(def->mem.max_memory && def->mem.memory_slots)) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("both maximum memory size and " - "memory slot count must be specified")); + _("both maximum memory size and memory slot count m= ust be specified")); return -1; } =20 if (def->mem.max_memory && def->mem.max_memory < virDomainDefGetMemoryTotal(def)) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("maximum memory size must be equal or greater tha= n " - "the actual memory size")); + _("maximum memory size must be equal or greater tha= n the actual memory size")); return -1; } =20 @@ -102,8 +98,7 @@ virDomainDefPostParseOs(virDomainDef *def) =20 if (def->os.firmwareFeatures[VIR_DOMAIN_OS_DEF_FIRMWARE_FEATURE_SE= CURE_BOOT] =3D=3D VIR_TRISTATE_BOOL_NO) { virReportError(VIR_ERR_XML_DETAIL, "%s", - _("firmware feature 'enrolled-keys' cannot be e= nabled when " - "firmware feature 'secure-boot' is disabled")= ); + _("firmware feature 'enrolled-keys' cannot be e= nabled when firmware feature 'secure-boot' is disabled")); return -1; } =20 @@ -165,8 +160,7 @@ virDomainDefPostParseTimer(virDomainDef *def) timer->name =3D=3D VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK) { if (timer->tickpolicy) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of " - "timer tickpolicy"), + _("timer %s doesn't support setting of time= r tickpolicy"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } @@ -177,24 +171,21 @@ virDomainDefPostParseTimer(virDomainDef *def) timer->catchup.limit !=3D 0 || timer->catchup.slew !=3D 0)) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("setting of timer catchup policies is only " - "supported with tickpolicy=3D'catchup'")); + _("setting of timer catchup policies is only su= pported with tickpolicy=3D'catchup'")); return -1; } =20 if (timer->name !=3D VIR_DOMAIN_TIMER_NAME_TSC) { if (timer->frequency !=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of " - "timer frequency"), + _("timer %s doesn't support setting of time= r frequency"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } =20 if (timer->mode) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of " - "timer mode"), + _("timer %s doesn't support setting of time= r mode"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } @@ -204,8 +195,7 @@ virDomainDefPostParseTimer(virDomainDef *def) timer->name !=3D VIR_DOMAIN_TIMER_NAME_RTC) { if (timer->track !=3D VIR_DOMAIN_TIMER_TRACK_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("timer %s doesn't support setting of " - "timer track"), + _("timer %s doesn't support setting of time= r track"), virDomainTimerNameTypeToString(timer->name)= ); return -1; } @@ -351,9 +341,7 @@ virDomainHostdevDefPostParse(virDomainHostdevDef *dev, VIR_DOMAIN_DISK_BUS_SCSI, addr)) { virReportError(VIR_ERR_XML_ERROR, - _("SCSI host address controller=3D'%u' " - "bus=3D'%u' target=3D'%u' unit=3D'%u' in " - "use by a SCSI disk"), + _("SCSI host address controller=3D'%u' bus=3D'%= u' target=3D'%u' unit=3D'%u' in use by a SCSI disk"), addr->controller, addr->bus, addr->target, addr->unit); return -1; @@ -370,8 +358,7 @@ virDomainHostdevDefPostParse(virDomainHostdevDef *dev, (model =3D=3D VIR_MDEV_MODEL_TYPE_VFIO_CCW && dev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)) { virReportError(VIR_ERR_XML_ERROR, - _("Unsupported address type '%s' with mediated " - "device model '%s'"), + _("Unsupported address type '%s' with mediated = device model '%s'"), virDomainDeviceAddressTypeToString(dev->info->t= ype), virMediatedDeviceModelTypeToString(model)); return -1; @@ -611,8 +598,7 @@ virDomainControllerDefPostParse(virDomainControllerDef = *cdev) cdev->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIO= NAL && cdev->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANS= ITIONAL) { virReportError(VIR_ERR_XML_ERROR, "%s", - _("'iothread' attribute only supported for " - "virtio scsi controllers")); + _("'iothread' attribute only supported for virtio s= csi controllers")); return -1; } =20 @@ -774,8 +760,7 @@ virDomainDefCheckUnsupportedMemoryHotplug(virDomainDef = *def) /* memory hotplug tunables are not supported by this driver */ if (virDomainDefHasMemoryHotplug(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("memory hotplug tunables are not " - "supported by this hypervisor driver")); + _("memory hotplug tunables are not supp= orted by this hypervisor driver")); return -1; } =20 @@ -1003,8 +988,7 @@ virDomainVcpuDefPostParse(virDomainDef *def) case VIR_TRISTATE_BOOL_NO: if (!vcpu->online) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("vcpu '%zu' is both offline and not " - "hotpluggable"), i); + _("vcpu '%zu' is both offline and not hotpl= uggable"), i); return -1; } break; @@ -1083,8 +1067,7 @@ virDomainDefBootOrderPostParse(virDomainDef *def) =20 if (def->os.nBootDevs > 0 && virHashSize(bootHash) > 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("per-device boot elements cannot be used" - " together with os/boot elements")); + _("per-device boot elements cannot be used together= with os/boot elements")); return -1; } =20 --=20 2.35.1