From nobody Fri Dec 19 06:34:35 2025 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=1678464753; cv=none; d=zohomail.com; s=zohoarc; b=KAzrf0VKbgOua2hspcOslXmUQXWjvAxAA5iLLr7eaAzlV7hEtIqxDC6hagxff1DqtQRg97zKB1tzd2baddlizblt4mSigsfmk4T+nL8s6YrtKsY4mVVi65PpahcGystVyX8cz7joLTc07G3bWlURGDNm+4eCr4cnbePpnP1Ng6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464753; 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=dvocpbLDY+rDSSA7gRWpYlSw7It/GGuGJ6VK/VBqKNs=; b=KK4ZcrQc5OT4VqHofKQ/OAEHnkaybj7m5bb/HqDQIRSdVKVXCHxpbxHa94oavANRcCd2BI0QdzHHSZUt5wc1KbS8Isq5f0pU1CAItmUm2ftKjuk29q3IwT1UNHDRmixM1Ggx2a4PvqhVWvASp4fbNLNBxTYeyipF/U4Fo1I6dRw= 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 1678464753662823.7517863494503; Fri, 10 Mar 2023 08:12:33 -0800 (PST) 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-491-DxN_2D6NNXyt9sXV3MZ0yg-1; Fri, 10 Mar 2023 11:11:28 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C886D80D11C; Fri, 10 Mar 2023 16:10:45 +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 A6E36C15BAD; Fri, 10 Mar 2023 16:10:45 +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 9546619472C4; Fri, 10 Mar 2023 16:10:45 +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 7A63619472C0 for ; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 72791C16022; Fri, 10 Mar 2023 16:10:41 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18D82C15BA0 for ; Fri, 10 Mar 2023 16:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464752; 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=dvocpbLDY+rDSSA7gRWpYlSw7It/GGuGJ6VK/VBqKNs=; b=EmpcAUpYXGXsVt0zF507HpMTFt2tiAGdLJNKYO3oU015UZzr5n/Jt6RKJL6+qNWuT7sH34 ncjOr/8ifY/y+voKKAi3TVB7GxS67bH6xFdAe5pOZ9aqQmwy8gKPp4nuPTtA4udE8jmnhe 4sfUfJ7i28i5scvtbby406NvVquVG7g= X-MC-Unique: DxN_2D6NNXyt9sXV3MZ0yg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 21/51] node_device: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:37 +0100 Message-Id: <870dc05cc9911298d0762424e0ebb0057ebbbd22.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 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 3.1 on 10.11.54.8 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: 1678464755426100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/node_device/node_device_driver.c | 37 ++++++++++----------- src/node_device/node_device_udev.c | 49 ++++++++++++++-------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index 355ab31745..3cac25a10c 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -136,7 +136,7 @@ nodeDeviceUpdateDriverName(virNodeDeviceDef *def) =20 if (virFileResolveLink(driver_link, &devpath) < 0) { virReportSystemError(errno, - _("cannot resolve driver link %s"), driver_li= nk); + _("cannot resolve driver link %1$s"), driver_= link); return -1; } =20 @@ -236,7 +236,7 @@ nodeDeviceObjFindByName(const char *name) =20 if (!(obj =3D virNodeDeviceObjListFindByName(driver->devs, name))) { virReportError(VIR_ERR_NO_NODE_DEVICE, - _("no node device with matching name '%s'"), + _("no node device with matching name '%1$s'"), name); } =20 @@ -735,7 +735,7 @@ nodeDeviceGetMdevctlCommand(virNodeDeviceDef *def, default: /* SHOULD NEVER HAPPEN */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown Command '%i'"), cmd_type); + _("Unknown Command '%1$i'"), cmd_type); return NULL; } =20 @@ -744,7 +744,7 @@ nodeDeviceGetMdevctlCommand(virNodeDeviceDef *def, case MDEVCTL_CMD_DEFINE: if (!def->caps->data.mdev.parent_addr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to find parent device '%s'"), def->pa= rent); + _("unable to find parent device '%1$s'"), def->= parent); return NULL; } =20 @@ -802,7 +802,7 @@ virMdevctlCreate(virNodeDeviceDef *def, char **uuid) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to start mediated device: %s"), + _("Unable to start mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -832,7 +832,7 @@ virMdevctlDefine(virNodeDeviceDef *def, char **uuid) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to define mediated device: %s"), + _("Unable to define mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -913,8 +913,7 @@ nodeDeviceCreateXML(virConnectPtr conn, =20 if (device =3D=3D NULL) virReportError(VIR_ERR_NO_NODE_DEVICE, - _("no node device for '%s' with matching " - "wwnn '%s' and wwpn '%s'"), + _("no node device for '%1$s' with matching wwnn= '%2$s' and wwpn '%3$s'"), def->name, wwnn, wwpn); } else if (nodeDeviceHasCapability(def, VIR_NODE_DEV_CAP_MDEV)) { device =3D nodeDeviceCreateXMLMdev(conn, def); @@ -944,7 +943,7 @@ virMdevctlStop(virNodeDeviceDef *def) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to destroy '%s': %s"), def->name, + _("Unable to destroy '%1$s': %2$s"), def->name, MDEVCTL_ERROR(errmsg)); return -1; } @@ -970,7 +969,7 @@ virMdevctlUndefine(virNodeDeviceDef *def) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to undefine mediated device: %s"), + _("Unable to undefine mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -996,7 +995,7 @@ virMdevctlStart(virNodeDeviceDef *def) =20 if (status !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to create mediated device: %s"), + _("Unable to create mediated device: %1$s"), MDEVCTL_ERROR(errmsg)); return -1; } @@ -1279,7 +1278,7 @@ nodeDeviceDestroy(virNodeDevicePtr device) =20 if (!(obj =3D virNodeDeviceObjListFindByName(driver->devs, parent)= )) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot find parent '%s' definition"), parent= ); + _("cannot find parent '%1$s' definition"), pare= nt); goto cleanup; } =20 @@ -1296,7 +1295,7 @@ nodeDeviceDestroy(virNodeDevicePtr device) =20 if (!virNodeDeviceObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Device '%s' is not active"), def->name); + _("Device '%1$s' is not active"), def->name); goto cleanup; } =20 @@ -1317,7 +1316,7 @@ nodeDeviceDestroy(virNodeDevicePtr device) =20 if (fd < 0 && errno =3D=3D EBUSY) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to destroy '%s': device in use"), + _("Unable to destroy '%1$s': device in use"), def->name); goto cleanup; } @@ -1478,7 +1477,7 @@ nodeDeviceUndefine(virNodeDevice *device, =20 if (!virNodeDeviceObjIsPersistent(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Node device '%s' is not defined"), + _("Node device '%1$s' is not defined"), def->name); goto cleanup; } @@ -1712,7 +1711,7 @@ nodeDeviceUpdateMediatedDevices(void) =20 if ((data.ndefs =3D virMdevctlListDefined(&defs, &errmsg)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to query mdevs from mdevctl: %s"), errmsg= ); + _("failed to query mdevs from mdevctl: %1$s"), errm= sg); return -1; } =20 @@ -1837,7 +1836,7 @@ nodeDeviceSetAutostart(virNodeDevice *device, =20 if (virMdevctlSetAutostart(def, autostart, &errmsg) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to set autostart on '%s': %s"), + _("Unable to set autostart on '%1$s': %2$s"= ), def->name, errmsg && errmsg[0] !=3D '\0' ? errmsg : _(= "Unknown Error")); goto cleanup; @@ -1923,7 +1922,7 @@ static int nodeDeviceDefValidateMdev(virNodeDeviceDef= *def, obj =3D virNodeDeviceObjListFindByName(driver->devs, def->parent); if (!obj) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("invalid parent device '%s'"), + _("invalid parent device '%1$s'"), def->parent); return -1; } @@ -1933,7 +1932,7 @@ static int nodeDeviceDefValidateMdev(virNodeDeviceDef= *def, * device and stored it in the mdev caps */ if (!mdev->parent_addr) { virReportError(VIR_ERR_PARSE_FAILED, - _("Unable to find address for parent device '%s'"), + _("Unable to find address for parent device '%1$s'"= ), def->parent); return -1; } diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 5782aa43c8..4c37ec3189 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -186,14 +186,14 @@ udevGetIntProperty(struct udev_device *udev_device, str =3D udevGetDeviceProperty(udev_device, property_key); if (!str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing udev property '%s' on '%s'"), + _("Missing udev property '%1$s' on '%2$s'"), property_key, udev_device_get_sysname(udev_device)); return -1; } =20 if (virStrToLong_i(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse int '%s' from udev property '%s'= on '%s'"), + _("Failed to parse int '%1$s' from udev property '%= 2$s' on '%3$s'"), str, property_key, udev_device_get_sysname(udev_dev= ice)); return -1; } @@ -212,14 +212,14 @@ udevGetUintProperty(struct udev_device *udev_device, str =3D udevGetDeviceProperty(udev_device, property_key); if (!str) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing udev property '%s' on '%s'"), + _("Missing udev property '%1$s' on '%2$s'"), property_key, udev_device_get_sysname(udev_device)); return -1; } =20 if (virStrToLong_ui(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse uint '%s' from udev property '%s= ' on '%s'"), + _("Failed to parse uint '%1$s' from udev property '= %2$s' on '%3$s'"), str, property_key, udev_device_get_sysname(udev_dev= ice)); return -1; } @@ -271,7 +271,7 @@ udevGetIntSysfsAttr(struct udev_device *udev_device, =20 if (str && virStrToLong_i(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to convert '%s' to int"), str); + _("Failed to convert '%1$s' to int"), str); return -1; } =20 @@ -291,7 +291,7 @@ udevGetUintSysfsAttr(struct udev_device *udev_device, =20 if (str && virStrToLong_ui(str, NULL, base, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to convert '%s' to unsigned int"), str); + _("Failed to convert '%1$s' to unsigned int"), str); return -1; } =20 @@ -310,7 +310,7 @@ udevGetUint64SysfsAttr(struct udev_device *udev_device, =20 if (str && virStrToLong_ull(str, NULL, 0, value) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to convert '%s' to unsigned long long"), = str); + _("Failed to convert '%1$s' to unsigned long long")= , str); return -1; } =20 @@ -385,7 +385,7 @@ udevProcessPCI(struct udev_device *device, virStrToLong_ui(p + 1, &p, 16, &pci_dev->slot) < 0 || p =3D=3D NUL= L || virStrToLong_ui(p + 1, &p, 16, &pci_dev->function) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the PCI address from sysfs path:= '%s'"), + _("failed to parse the PCI address from sysfs path:= '%1$s'"), def->sysfs_path); goto cleanup; } @@ -469,7 +469,7 @@ udevProcessMdevParent(struct udev_device *device, =20 if (virMediatedDeviceParentGetAddress(def->sysfs_path, &mdev_parent->a= ddress) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to find address for mdev parent device '%= s'"), + _("Unable to find address for mdev parent device '%= 1$s'"), def->name); return -1; } @@ -636,7 +636,7 @@ udevProcessSCSIHost(struct udev_device *device G_GNUC_U= NUSED, if (!(str =3D STRSKIP(filename, "host")) || virStrToLong_ui(str, NULL, 0, &scsi_host->host) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse SCSI host '%s'"), + _("failed to parse SCSI host '%1$s'"), filename); return -1; } @@ -745,7 +745,7 @@ udevProcessSCSIDevice(struct udev_device *device G_GNUC= _UNUSED, virStrToLong_ui(p + 1, &p, 10, &scsi->target) < 0 || p =3D=3D NULL= || virStrToLong_ui(p + 1, &p, 10, &scsi->lun) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the SCSI address from filename: = '%s'"), + _("failed to parse the SCSI address from filename: = '%1$s'"), filename); return -1; } @@ -765,7 +765,7 @@ udevProcessSCSIDevice(struct udev_device *device G_GNUC= _UNUSED, cleanup: if (ret !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to process SCSI device with sysfs path '%= s'"), + _("Failed to process SCSI device with sysfs path '%= 1$s'"), def->sysfs_path); } return ret; @@ -1062,13 +1062,13 @@ udevProcessMediatedDevice(struct udev_device *dev, =20 if (virFileWaitForExists(linkpath, 10, 100) < 0) { virReportSystemError(errno, - _("failed to wait for file '%s' to appear"), + _("failed to wait for file '%1$s' to appear"), linkpath); return -1; } =20 if (virFileResolveLink(linkpath, &canonicalpath) < 0) { - virReportSystemError(errno, _("failed to resolve '%s'"), linkpath); + virReportSystemError(errno, _("failed to resolve '%1$s'"), linkpat= h); return -1; } =20 @@ -1088,7 +1088,7 @@ udevProcessMediatedDevice(struct udev_device *dev, =20 if (!data->parent_addr) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get parent of '%s'"), + _("Could not get parent of '%1$s'"), udev_device_get_syspath(dev)); return -1; } @@ -1113,7 +1113,7 @@ udevGetCCWAddress(const char *sysfs_path, &data->ccw_dev.ssid, &data->ccw_dev.devno) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the CCW address from sysfs path:= '%s'"), + _("failed to parse the CCW address from sysfs path:= '%1$s'"), sysfs_path); return -1; } @@ -1188,7 +1188,7 @@ udevGetVDPACharDev(const char *sysfs_path, =20 if (!virFileExists(chardev)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("vDPA chardev path '%s' does not exist"), + _("vDPA chardev path '%1$s' does not exist"= ), chardev); return -1; } @@ -1230,7 +1230,7 @@ udevProcessAPCard(struct udev_device *device, virStrToLong_ui(c + 1 + strlen("card"), NULL, 16, &data->ap_card.ap_adapter) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the AP Card from sysfs path: '%s= '"), + _("failed to parse the AP Card from sysfs path: '%1= $s'"), def->sysfs_path); return -1; } @@ -1255,7 +1255,7 @@ udevProcessAPQueue(struct udev_device *device, virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_adapter) < 0 || virStrToLong_ui(c + 1, &c, 16, &data->ap_queue.ap_domain) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse the AP Queue from sysfs path: '%= s'"), + _("failed to parse the AP Queue from sysfs path: '%= 1$s'"), def->sysfs_path); return -1; } @@ -1511,7 +1511,7 @@ udevSetParent(struct udev_device *device, parent_sysfs_path =3D udev_device_get_syspath(parent_device); if (parent_sysfs_path =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get syspath for parent of '%s'"), + _("Could not get syspath for parent of '%1$s'"), udev_device_get_syspath(parent_device)); return -1; } @@ -1795,8 +1795,7 @@ udevEventMonitorSanityCheck(udevEventData *priv, rc =3D udev_monitor_get_fd(priv->udev_monitor); if (fd !=3D rc) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("File descriptor returned by udev %d does not " - "match node device file descriptor %d"), + _("File descriptor returned by udev %1$d does not m= atch node device file descriptor %2$d"), fd, rc); =20 /* this is a non-recoverable error, let's remove the handle, so th= at we @@ -1934,7 +1933,7 @@ udevGetDMIData(virNodeDevCapSystem *syscap) device =3D udev_device_new_from_syspath(udev, DMI_DEVPATH); if (device =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get udev device for syspath '%s'"), + _("Failed to get udev device for syspath '%1$s'= "), DMI_DEVPATH); return; } @@ -2153,7 +2152,7 @@ monitorFileRecursively(udevEventData *udev, error: g_list_free_full(monitors, g_object_unref); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to monitor directory: %s"), error->message); + _("Unable to monitor directory: %1$s"), error->message); g_clear_error(&error); return NULL; } @@ -2272,7 +2271,7 @@ nodeStateInitialize(bool privileged, } =20 if (g_mkdir_with_parents(driver->stateDir, S_IRWXU) < 0) { - virReportSystemError(errno, _("cannot create state directory '%s'"= ), + virReportSystemError(errno, _("cannot create state directory '%1$s= '"), driver->stateDir); goto cleanup; } --=20 2.39.2