From nobody Mon Feb 9 00:10:13 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=1678464787; cv=none; d=zohomail.com; s=zohoarc; b=i3TxQ+NPSubxhLWJ0lkEEUlBiZ94038XMNOoUAlt+8I9sWWFLTFwLVflHtOcZc6IvumumMhmHAOLuRccA/fM37Dlg1QuVxQfNKWde/bWmzuWN5DDARNgPhO4Lo8LD1fKmO1QwUukjB6vYQp802arXRy2Eqip9IeY34YI836y8yY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464787; 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=WPpL3Hk16SBqGeutYC5MOj8/tFyA7W2ZuGKPH0hW4Qw=; b=ZxhZ2POPMnpWYQBGcwn3V0P37V8c+Uw3UkhHBkVntSk4YBNrtlPUAiJL4zjhSOWLliVXoCe+GaH80HS0ilHBEwnNF2Fj27uPsmURAj7RpcxieyHk/I4FUBMZYxVoTpkwbF6q//SkKCa40EoZcjrvd9mPMErkNa+WF6wqVeVaayY= 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 1678464787367260.4489418358428; Fri, 10 Mar 2023 08:13:07 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-644-DeCn2XnKNyOaJ4dzBG5aUw-1; Fri, 10 Mar 2023 11:12:22 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3FE83C10C6C; Fri, 10 Mar 2023 16:10:34 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD3CF140EBF4; Fri, 10 Mar 2023 16:10:34 +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 CB14C1946A5E; Fri, 10 Mar 2023 16:10:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F34961946587 for ; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E9CF744101; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E196440D8 for ; Fri, 10 Mar 2023 16:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464786; 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=WPpL3Hk16SBqGeutYC5MOj8/tFyA7W2ZuGKPH0hW4Qw=; b=R2vRG+nHIf1KLkPQYNprg8ZKKW2ZMCX019WEVr8n973htcvlk/FiHvwf3bA7vTj1GaXji2 V85sSyb+aiWb9i4M1mR5QliIB7xhig0VBaNGLz1Ym8bud6pSZFcCti5e9h6v5ij0mFFKdX sxDq2j2FazO1B+z4/aZVcyVN7aDCx1o= X-MC-Unique: DeCn2XnKNyOaJ4dzBG5aUw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 14/51] hypervisor: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:30 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.7 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: 1678464787693100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/hypervisor/domain_cgroup.c | 4 +-- src/hypervisor/domain_driver.c | 20 ++++++------- src/hypervisor/virhostdev.c | 53 ++++++++++++++-------------------- 3 files changed, 33 insertions(+), 44 deletions(-) diff --git a/src/hypervisor/domain_cgroup.c b/src/hypervisor/domain_cgroup.c index 7265325406..20ad96b11c 100644 --- a/src/hypervisor/domain_cgroup.c +++ b/src/hypervisor/domain_cgroup.c @@ -166,7 +166,7 @@ virDomainCgroupSetupDomainBlkioParameters(virCgroup *cg= roup, } } } else { - virReportError(VIR_ERR_INVALID_ARG, _("Unknown blkio param= eter %s"), + virReportError(VIR_ERR_INVALID_ARG, _("Unknown blkio param= eter %1$s"), param->field); ret =3D -1; virBlkioDeviceArrayClear(devices, ndevices); @@ -370,7 +370,7 @@ virDomainCgroupInitCgroup(const char *prefix, =20 if (!g_path_is_absolute(vm->def->resource->partition)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Resource partition '%s' must start with '/'"), + _("Resource partition '%1$s' must start with '/'"), vm->def->resource->partition); return -1; } diff --git a/src/hypervisor/domain_driver.c b/src/hypervisor/domain_driver.c index d020b94921..66e09ffb04 100644 --- a/src/hypervisor/domain_driver.c +++ b/src/hypervisor/domain_driver.c @@ -151,7 +151,7 @@ virDomainDriverMergeBlkioDevice(virBlkioDevice **dest_a= rray, } else if (STREQ(type, VIR_DOMAIN_BLKIO_DEVICE_WRITE_BPS))= { dest->wbps =3D src->wbps; } else { - virReportError(VIR_ERR_INVALID_ARG, _("Unknown paramet= er %s"), + virReportError(VIR_ERR_INVALID_ARG, _("Unknown paramet= er %1$s"), type); return -1; } @@ -256,7 +256,7 @@ virDomainDriverParseBlkioDeviceStr(char *blkioDeviceStr= , const char *type, goto number_error; } else { virReportError(VIR_ERR_INVALID_ARG, - _("unknown parameter '%s'"), type); + _("unknown parameter '%1$s'"), type); goto cleanup; } =20 @@ -279,13 +279,13 @@ virDomainDriverParseBlkioDeviceStr(char *blkioDeviceS= tr, const char *type, =20 parse_error: virReportError(VIR_ERR_INVALID_ARG, - _("unable to parse blkio device '%s' '%s'"), + _("unable to parse blkio device '%1$s' '%2$s'"), type, blkioDeviceStr); goto cleanup; =20 number_error: virReportError(VIR_ERR_INVALID_ARG, - _("invalid value '%s' for parameter '%s' of device '%s'= "), + _("invalid value '%1$s' for parameter '%2$s' of device = '%3$s'"), temp, type, result[i].path); =20 cleanup: @@ -362,7 +362,7 @@ virDomainDriverNodeDeviceGetPCIInfo(virNodeDeviceDef *d= ef, =20 if (!cap) { virReportError(VIR_ERR_INVALID_ARG, - _("device %s is not a PCI device"), def->name); + _("device %1$s is not a PCI device"), def->name); return -1; } =20 @@ -525,7 +525,7 @@ virDomainDriverAddIOThreadCheck(virDomainDef *def, { if (virDomainIOThreadIDFind(def, iothread_id)) { virReportError(VIR_ERR_INVALID_ARG, - _("an IOThread is already using iothread_id '%u'"), + _("an IOThread is already using iothread_id '%1$u'"= ), iothread_id); return -1; } @@ -548,7 +548,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, =20 if (!virDomainIOThreadIDFind(def, iothread_id)) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot find IOThread '%u' in iothreadids list"), + _("cannot find IOThread '%1$u' in iothreadids list"= ), iothread_id); return -1; } @@ -556,8 +556,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, for (i =3D 0; i < def->ndisks; i++) { if (def->disks[i]->iothread =3D=3D iothread_id) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot remove IOThread %u since it " - "is being used by disk '%s'"), + _("cannot remove IOThread %1$u since it is bein= g used by disk '%2$s'"), iothread_id, def->disks[i]->dst); return -1; } @@ -566,8 +565,7 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, for (i =3D 0; i < def->ncontrollers; i++) { if (def->controllers[i]->iothread =3D=3D iothread_id) { virReportError(VIR_ERR_INVALID_ARG, - _("cannot remove IOThread '%u' since it " - "is being used by controller"), + _("cannot remove IOThread '%1$u' since it is be= ing used by controller"), iothread_id); return -1; } diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index bc5a20d691..eac3474783 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -94,13 +94,12 @@ static int virHostdevIsPCINodeDeviceUsed(virPCIDeviceAd= dress *devAddr, void *opa =20 if (actual_drvname && actual_domname) virReportError(VIR_ERR_OPERATION_INVALID, - _("PCI device %s is in use by " - "driver %s, domain %s"), + _("PCI device %1$s is in use by driver %2$s, do= main %3$s"), virPCIDeviceGetName(actual), actual_drvname, actual_domname); else virReportError(VIR_ERR_OPERATION_INVALID, - _("PCI device %s is in use"), + _("PCI device %1$s is in use"), virPCIDeviceGetName(actual)); return -1; } @@ -171,7 +170,7 @@ virHostdevManagerNew(void) =20 if (g_mkdir_with_parents(hostdevMgr->stateDir, 0777) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to create state dir '%s'"), + _("Failed to create state dir '%1$s'"), hostdevMgr->stateDir); return NULL; } @@ -188,7 +187,7 @@ virHostdevManagerNew(void) if (g_mkdir_with_parents(hostdevMgr->stateDir, 0777) < 0) { umask(old_umask); virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to create state dir '%s'"), + _("Failed to create state dir '%1$s'"), hostdevMgr->stateDir); return NULL; } @@ -250,7 +249,7 @@ virHostdevGetPCIHostDevice(const virDomainHostdevDef *h= ostdev, virPCIDeviceSetStubDriver(actual, VIR_PCI_STUB_DRIVER_XEN); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("pci backend driver '%s' is not supported"), + _("pci backend driver '%1$s' is not supported"), virDomainHostdevSubsysPCIBackendTypeToString(pcisrc= ->backend)); return -1; } @@ -333,7 +332,7 @@ virHostdevNetDevice(virDomainHostdevDef *hostdev, =20 if (!(*linkdev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("The device at %s has no network device name"= ), + _("The device at %1$s has no network device nam= e"), sysfs_path); return -1; } @@ -378,9 +377,7 @@ virHostdevNetConfigVirtPortProfile(const char *linkdev,= int vf, case VIR_NETDEV_VPORT_PROFILE_8021QBG: case VIR_NETDEV_VPORT_PROFILE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("virtualport type %s is " - "currently not supported on interfaces of type " - "hostdev"), + _("virtualport type %1$s is currently not supported= on interfaces of type hostdev"), virNetDevVPortTypeToString(virtPort->virtPortType)); break; =20 @@ -475,8 +472,7 @@ virHostdevSetNetConfig(virDomainHostdevDef *hostdev, if (virtPort) { if (vlan) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("direct setting of the vlan tag is not allowe= d " - "for hostdev devices using %s mode"), + _("direct setting of the vlan tag is not allowe= d for hostdev devices using %1$s mode"), virNetDevVPortTypeToString(virtPort->virtPortTy= pe)); return -1; } @@ -611,7 +607,7 @@ virHostdevResetAllPCIDevices(virHostdevManager *mgr, VIR_DEBUG("Resetting PCI device %s", virPCIDeviceGetName(pci)); if (virPCIDeviceReset(pci, mgr->activePCIHostdevs, mgr->inactivePCIHostdevs) < 0) { - VIR_ERROR(_("Failed to reset PCI device: %s"), + VIR_ERROR(_("Failed to reset PCI device: %1$s"), virGetLastErrorMessage()); ret =3D -1; } @@ -642,7 +638,7 @@ virHostdevReattachAllPCIDevices(virHostdevManager *mgr, if (virPCIDeviceReattach(actual, mgr->activePCIHostdevs, mgr->inactivePCIHostdevs) < 0) { - VIR_ERROR(_("Failed to re-attach PCI device: %s"), + VIR_ERROR(_("Failed to re-attach PCI device: %1$s"), virGetLastErrorMessage()); } } else { @@ -699,7 +695,7 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr, =20 if (!usesVFIO && !virPCIDeviceIsAssignable(pci, strict_acs_check))= { virReportError(VIR_ERR_OPERATION_INVALID, - _("PCI device %s is not assignable"), + _("PCI device %1$s is not assignable"), virPCIDeviceGetName(pci)); goto cleanup; } @@ -788,8 +784,7 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr, goto reattachdevs; } else { virReportError(VIR_ERR_OPERATION_INVALID, - _("Unmanaged PCI device %s must be manually= " - "detached from the host"), + _("Unmanaged PCI device %1$s must be manual= ly detached from the host"), virPCIDeviceGetName(pci)); goto reattachdevs; } @@ -1012,7 +1007,7 @@ virHostdevReAttachPCIDevicesImpl(virHostdevManager *m= gr, if (!actual || virPCIDeviceListAdd(mgr->inactivePCIHostdevs, actual) < 0) { =20 - VIR_ERROR(_("Failed to add PCI device %s to the inactive list"= ), + VIR_ERROR(_("Failed to add PCI device %1$s to the inactive lis= t"), virGetLastErrorMessage()); virResetLastError(); } @@ -1104,7 +1099,7 @@ virHostdevReAttachPCIDevices(virHostdevManager *mgr, return; =20 if (!(pcidevs =3D virHostdevGetPCIHostDeviceList(hostdevs, nhostdevs))= ) { - VIR_ERROR(_("Failed to allocate PCI device list: %s"), + VIR_ERROR(_("Failed to allocate PCI device list: %1$s"), virGetLastErrorMessage()); virResetLastError(); return; @@ -1340,13 +1335,12 @@ virHostdevMarkUSBDevices(virHostdevManager *mgr, virUSBDeviceGetUsedBy(tmp, &other_drvname, &other_domname); if (other_drvname && other_domname) virReportError(VIR_ERR_OPERATION_INVALID, - _("USB device %s is in use by " - "driver %s, domain %s"), + _("USB device %1$s is in use by driver %2$s= , domain %3$s"), virUSBDeviceGetName(tmp), other_drvname, other_domname); else virReportError(VIR_ERR_OPERATION_INVALID, - _("USB device %s is already in use"), + _("USB device %1$s is already in use"), virUSBDeviceGetName(tmp)); goto error; } @@ -1423,13 +1417,11 @@ virHostdevFindUSBDevice(virDomainHostdevDef *hostde= v, } else if (rc > 1) { if (autoAddress) { virReportError(VIR_ERR_OPERATION_FAILED, - _("Multiple USB devices for %x:%x were foun= d," - " but none of them is at bus:%u device:%u= "), + _("Multiple USB devices for %1$x:%2$x were = found, but none of them is at bus:%3$u device:%4$u"), vendor, product, bus, device); } else { virReportError(VIR_ERR_OPERATION_FAILED, - _("Multiple USB devices for %x:%x, " - "use
to specify one"), + _("Multiple USB devices for %1$x:%2$x, use =
to specify one"), vendor, product); } return -1; @@ -1610,8 +1602,7 @@ virHostdevPrepareSCSIDevices(virHostdevManager *mgr, =20 if (!(scsi_shareable && tmp_shareable)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("SCSI device %s is already in use by " - "other domain(s) as '%s'"), + _("SCSI device %1$s is already in use by ot= her domain(s) as '%2$s'"), virSCSIDeviceGetName(tmp), tmp_shareable ? "shareable" : "non-shareabl= e"); goto error; @@ -2287,7 +2278,7 @@ virHostdevPrepareOneNVMeDevice(virHostdevManager *hos= tdev_mgr, addrStr =3D virPCIDeviceAddressAsString(addr); =20 virReportError(VIR_ERR_OPERATION_INVALID, - _("NVMe device %s already in use by driver %s domai= n %s"), + _("NVMe device %1$s already in use by driver %2$s d= omain %3$s"), NULLSTR(addrStr), actual_drvname, actual_domname); goto cleanup; } @@ -2376,7 +2367,7 @@ virHostdevPrepareNVMeDevices(virHostdevManager *hostd= ev_mgr, while (lastGoodDiskIdx >=3D 0) { if (virHostdevReAttachOneNVMeDevice(hostdev_mgr, drv_name, dom_nam= e, disks[lastGoodDiskIdx]->src) <= 0) { - VIR_ERROR(_("Failed to reattach NVMe for disk target: %s"), + VIR_ERROR(_("Failed to reattach NVMe for disk target: %1$s"), disks[lastGoodDiskIdx]->dst); } =20 @@ -2446,7 +2437,7 @@ virHostdevReAttachNVMeDevices(virHostdevManager *host= dev_mgr, for (i =3D 0; i < ndisks; i++) { if (virHostdevReAttachOneNVMeDevice(hostdev_mgr, drv_name, dom_name, disks[i]->src) < 0) { - VIR_ERROR(_("Failed to reattach NVMe for disk target: %s"), + VIR_ERROR(_("Failed to reattach NVMe for disk target: %1$s"), disks[i]->dst); ret =3D -1; } --=20 2.39.2