From nobody Fri Dec 19 04:18:13 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=1678464691; cv=none; d=zohomail.com; s=zohoarc; b=XTtkyh4rlN7LN3X43S9AvBDF91yEDhqM7Qb2vf/RC9QXHJCEFB9xvppt/HaJxTn/h5oeuef9FV14S4i8rKKLem1Z8nfflM5hofjR+PtI/a1FVZSbCPVs5W3BMJmK6BR7cS5R3LGs0sq9/nXtZ91pqkZIbGGgIqRANoXi6IPMsvY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464691; 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=5ycBh9RdGVlZpdswGk0Bt+QGV02rfWf+5YJ9wE5QNSs=; b=JKd7amZlLA0FtQKh1QfsVZBd6YXaApjV6IsieXdZJaB3cPYm/uDRUvF50uTEU7UnPrCnOjfVVrZN6IzHsNXprDXxjx3MtHBbWGM9iShNB4Eu1TmssFPgn76bgse2E511YFt+uoQD5fabZoQvnJ6PcJlZC01b7WsLVvmz5SaiTyc= 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 1678464691611372.96365375309085; Fri, 10 Mar 2023 08:11:31 -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-369-m0AhDcfiO3ubWQasumxVdw-1; Fri, 10 Mar 2023 11:11:24 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 12CBD3815F75; 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 ED2E7492B07; Fri, 10 Mar 2023 16:10:44 +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 DCADD1946A75; Fri, 10 Mar 2023 16:10:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 64FA31946A73 for ; Fri, 10 Mar 2023 16:10:40 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5C17B2166B2A; Fri, 10 Mar 2023 16:10:40 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA7862166B37 for ; Fri, 10 Mar 2023 16:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464690; 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=5ycBh9RdGVlZpdswGk0Bt+QGV02rfWf+5YJ9wE5QNSs=; b=G+pA7gwk6ZTHG1D8bgNPffvn8uPHelezqXchn8u/yQj+645XMCJ8KOk+4G+lOxVkn8HRoN vCxnYNlDd7j7Mvg1TGR8tPqB+2qcrauwxLVpgGF4T1eZbMmBhSu8BFIsaYJV7q3bn32LY9 u+Mz4WinAzAIno6lmJmGwa/+tRj03ZM= X-MC-Unique: m0AhDcfiO3ubWQasumxVdw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 20/51] network: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:36 +0100 Message-Id: <7dd481a79067ff0281c3d89d71b34efaa1ecd711.1678463799.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.9 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: 1678464693168100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/network/bridge_driver.c | 188 +++++++++++------------------- src/network/bridge_driver_conf.c | 2 +- src/network/bridge_driver_linux.c | 12 +- src/network/leaseshelper.c | 12 +- 4 files changed, 81 insertions(+), 133 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 3fa56bfc09..97e099880b 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -248,7 +248,7 @@ networkObjFromNetwork(virNetworkPtr net) if (!obj) { virUUIDFormat(net->uuid, uuidstr); virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching uuid '%s' (%s)"), + _("no network with matching uuid '%1$s' (%2$s)"), uuidstr, net->name); } =20 @@ -827,7 +827,7 @@ networkConnectSupportsFeature(virConnectPtr conn, int f= eature) case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER: case VIR_DRV_FEATURE_FD_PASSING: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Global feature %d should have already been handl= ed"), + _("Global feature %1$d should have already been han= dled"), feature); return -1; case VIR_DRV_FEATURE_MIGRATION_V2: @@ -937,8 +937,7 @@ networkDnsmasqConfLocalPTRs(virBuffer *buf, if (rc =3D=3D -2) { int family =3D VIR_SOCKET_ADDR_FAMILY(&ip->address); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("PTR domain for %s network with prefix %u= " - "cannot be automatically created"), + _("PTR domain for %1$s network with prefix = %2$u cannot be automatically created"), (family =3D=3D AF_INET) ? "IPv4" : "IPv6", virNetworkIPDefPrefix(ip)); } @@ -968,7 +967,7 @@ networkDnsmasqConfDHCP(virBuffer *buf, prefix =3D virNetworkIPDefPrefix(ipdef); if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bridge '%s' has an invalid prefix"), + _("bridge '%1$s' has an invalid prefix"), bridge); return -1; } @@ -993,8 +992,7 @@ networkDnsmasqConfDHCP(virBuffer *buf, =20 if (virSocketAddrPrefixToNetmask(prefix, &netmask, AF_INET) < = 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to translate bridge '%s' " - "prefix %d to netmask"), + _("Failed to translate bridge '%1$s' prefix= %2$d to netmask"), bridge, prefix); return -1; } @@ -1247,15 +1245,13 @@ networkDnsmasqConfContents(virNetworkObj *obj, */ if (!dns->srvs[i].service) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing required 'service' " - "attribute in SRV record of network '%s'"= ), + _("Missing required 'service' attribute in = SRV record of network '%1$s'"), def->name); return -1; } if (!dns->srvs[i].protocol) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Missing required 'service' " - "attribute in SRV record of network '%s'"= ), + _("Missing required 'service' attribute in = SRV record of network '%1$s'"), def->name); return -1; } @@ -1433,7 +1429,7 @@ networkBuildDhcpDaemonCommandLine(virNetworkDriverSta= te *driver, /* Write the file */ if (virFileWriteStr(configfile, configstr, 0600) < 0) { virReportSystemError(errno, - _("couldn't write dnsmasq config file '%s'"), + _("couldn't write dnsmasq config file '%1$s'"= ), configfile); return -1; } @@ -1487,7 +1483,7 @@ networkStartDhcpDaemon(virNetworkDriverState *driver, return 0; =20 if (g_mkdir_with_parents(cfg->pidDir, 0777) < 0) { - virReportSystemError(errno, _("cannot create directory %s"), cfg->= pidDir); + virReportSystemError(errno, _("cannot create directory %1$s"), cfg= ->pidDir); return -1; } =20 @@ -1496,7 +1492,7 @@ networkStartDhcpDaemon(virNetworkDriverState *driver, =20 if (g_mkdir_with_parents(cfg->dnsmasqStateDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create directory %s"), + _("cannot create directory %1$s"), cfg->dnsmasqStateDir); return -1; } @@ -1778,7 +1774,7 @@ networkSetIPv6Sysctl(const char *bridge, =20 if (virFileWriteStr(field, sysctl_setting, 0) < 0) { virReportSystemError(errno, - _("cannot write to '%s' on bridge '%s'"), + _("cannot write to '%1$s' on bridge '%2$s'"), field, bridge); return -1; } @@ -1839,7 +1835,7 @@ networkAddAddrToBridge(virNetworkObj *obj, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bridge '%s' has an invalid netmask or IP address= "), + _("bridge '%1$s' has an invalid netmask or IP addre= ss"), def->bridge); return -1; } @@ -1879,8 +1875,7 @@ networkAddRouteToBridge(virNetworkObj *obj, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' has an invalid netmask " - "or IP address in route definition"), + _("network '%1$s' has an invalid netmask or IP addr= ess in route definition"), def->name); return -1; } @@ -1922,7 +1917,7 @@ networkStartNetworkVirtual(virNetworkDriverState *dri= ver, * conscience, log an error and fail at this point. */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' has no bridge name defined"), + _("network '%1$s' has no bridge name defined"), def->name); return -1; } @@ -2148,7 +2143,7 @@ networkCreateInterfacePool(virNetworkDef *netdef) =20 if (virNetDevGetVirtualFunctions(netdef->forward.pfs->dev, &vfs) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not get Virtual functions on %s"), + _("Could not get Virtual functions on %1$s"), netdef->forward.pfs->dev); goto cleanup; } @@ -2207,7 +2202,7 @@ networkCreateInterfacePool(virNetworkDef *netdef) * failure */ virReportError(VIR_ERR_INTERNAL_ERROR, - _("No usable Vf's present on SRIOV PF %s"), + _("No usable Vf's present on SRIOV PF %1$s"), netdef->forward.pfs->dev); goto cleanup; } @@ -2431,7 +2426,7 @@ networkLookupByUUID(virConnectPtr conn, char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching uuid '%s'"), + _("no network with matching uuid '%1$s'"), uuidstr); goto cleanup; } @@ -2460,7 +2455,7 @@ networkLookupByName(virConnectPtr conn, obj =3D virNetworkObjFindByName(driver->networks, name); if (!obj) { virReportError(VIR_ERR_NO_NETWORK, - _("no network with matching name '%s'"), name); + _("no network with matching name '%1$s'"), name); goto cleanup; } def =3D virNetworkObjGetDef(obj); @@ -2670,7 +2665,7 @@ networkFindUnusedBridgeName(virNetworkObjList *nets, } while (++id <=3D MAX_BRIDGE_ID); =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Bridge generation exceeded max id %d"), + _("Bridge generation exceeded max id %1$d"), MAX_BRIDGE_ID); return -1; } @@ -2692,7 +2687,7 @@ networkBridgeNameValidate(virNetworkObjList *nets, if (def->bridge && !strstr(def->bridge, "%d")) { if (virNetworkObjBridgeInUse(nets, def->bridge, def->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("bridge name '%s' already in use."), + _("bridge name '%1$s' already in use."), def->bridge); return -1; } @@ -2755,32 +2750,28 @@ networkValidate(virNetworkDriverState *driver, */ if (def->mac_specified) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s wi= th forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; } if (virNetworkDefGetIPByIndex(def, AF_UNSPEC, 0)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s wit= h forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; } if (def->dns.ntxts || def->dns.nhosts || def->dns.nsrvs) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s wi= th forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; } if (def->domain) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network %s " - "with forward mode=3D'%s'"), + _("Unsupported element in network %1$s= with forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type= )); return -1; @@ -2796,8 +2787,7 @@ networkValidate(virNetworkDriverState *driver, if (def->bandwidth && !bandwidthAllowed) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported network-wide element " - "in network %s with forward mode=3D'%s'"), + _("Unsupported network-wide element in = network %1$s with forward mode=3D'%2$s'"), def->name, virNetworkForwardTypeToString(def->forward.type)); return -1; @@ -2825,11 +2815,7 @@ networkValidate(virNetworkDriverState *driver, =20 if (def->forward.type =3D=3D VIR_NETWORK_FORWARD_HOSTDEV) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("hostdev network '%s' lists '%s' " - "in the device pool, but hostdev " - "networks require all devices to " - "be listed by PCI address, not " - "network device name"), + _("hostdev network '%1$s' lists '%2$s' in t= he device pool, but hostdev networks require all devices to be listed by PC= I address, not network device name"), def->name, iface->device.dev); return -1; } @@ -2840,11 +2826,7 @@ networkValidate(virNetworkDriverState *driver, =20 if (def->forward.type !=3D VIR_NETWORK_FORWARD_HOSTDEV) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("network '%s' has forward mode '%s' " - " but lists a device by PCI address " - "in the device pool. This is only " - "supported for networks with forward " - "mode 'hostdev'"), + _("network '%1$s' has forward mode '%2$s' b= ut lists a device by PCI address in the device pool. This is only supported= for networks with forward mode 'hostdev'"), def->name, virNetworkForwardTypeToString(def->forward.= type)); return -1; @@ -2855,8 +2837,7 @@ networkValidate(virNetworkDriverState *driver, =20 if (!virPCIIsVirtualFunction(sysfs_path)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("device '%s' in network '%s' is not " - "an SR-IOV Virtual Function"), + _("device '%1$s' in network '%2$s' is not a= n SR-IOV Virtual Function"), sysfs_path, def->name); return -1; } @@ -2870,8 +2851,7 @@ networkValidate(virNetworkDriverState *driver, } if ((def->forward.npfs > 0) + usesInterface + usesAddress > 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("
, , and elements of " - " in network %s are mutually exclusive"), + _("
, , and elements of in network %1$s are mutually exclusive"), def->name); return -1; } @@ -2944,9 +2924,7 @@ networkValidate(virNetworkDriverState *driver, if (def->portGroups[i].isDefault) { if (defaultPortGroup) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("network '%s' has multiple default " - " elements (%s and %s), " - "but only one default is allowed"), + _("network '%1$s' has multiple default elements (%2$s and %3$s), but only one default is allowed"), def->name, defaultPortGroup->name, def->portGroups[i].name); return -1; @@ -2956,16 +2934,14 @@ networkValidate(virNetworkDriverState *driver, for (j =3D i + 1; j < def->nPortGroups; j++) { if (STREQ(def->portGroups[i].name, def->portGroups[j].name)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("multiple elements with the " - "same name (%s) in network '%s'"), + _("multiple elements with the s= ame name (%1$s) in network '%2$s'"), def->portGroups[i].name, def->name); return -1; } } if (def->portGroups[i].bandwidth && !bandwidthAllowed) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Unsupported element in network '= %s' " - "in portgroup '%s' with forward mode=3D'%s'"), + _("Unsupported element in network '= %1$s' in portgroup '%2$s' with forward mode=3D'%3$s'"), def->name, def->portGroups[i].name, virNetworkForwardTypeToString(def->forward.type= )); return -1; @@ -2979,8 +2955,7 @@ networkValidate(virNetworkDriverState *driver, * checks were done in the loop above. */ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" element specified for network %s, " - "whose type doesn't support vlan configuration"), + _(" element specified for network %1$s, whose= type doesn't support vlan configuration"), def->name); return -1; } @@ -2989,9 +2964,7 @@ networkValidate(virNetworkDriverState *driver, for (i =3D 0; i < def->nPortGroups; i++) { if (def->portGroups[i].bandwidth) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unsupported element " - "in of " - "network '%s' with forward mode=3D'%s'"), + _("unsupported element in of network '%2$s' with forward mode=3D'%3$s'"), def->portGroups[i].name, def->name, virNetworkForwardTypeToString(def->forward.= type)); return -1; @@ -3433,7 +3406,7 @@ networkDestroy(virNetworkPtr net) =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -3513,7 +3486,7 @@ networkGetBridgeName(virNetworkPtr net) =20 if (!(def->bridge)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' does not have a bridge name."), + _("network '%1$s' does not have a bridge name."), def->name); goto cleanup; } @@ -3588,21 +3561,21 @@ networkSetAutostart(virNetworkPtr net, if (new_autostart) { if (g_mkdir_with_parents(cfg->networkAutostartDir, 0777) < 0) { virReportSystemError(errno, - _("cannot create autostart directory = '%s'"), + _("cannot create autostart directory = '%1$s'"), cfg->networkAutostartDir); goto cleanup; } =20 if (symlink(configFile, autostartLink) < 0) { virReportSystemError(errno, - _("Failed to create symlink '%s' to '= %s'"), + _("Failed to create symlink '%1$s' to= '%2$s'"), autostartLink, configFile); goto cleanup; } } else { if (unlink(autostartLink) < 0 && errno !=3D ENOENT && errno != =3D ENOTDIR) { virReportSystemError(errno, - _("Failed to delete symlink '%s'"), + _("Failed to delete symlink '%1$s'"), autostartLink); goto cleanup; } @@ -3671,7 +3644,7 @@ networkGetDHCPLeases(virNetworkPtr net, rv =3D 0; } else { virReportSystemError(errno, - _("Unable to read leases file: %s"), + _("Unable to read leases file: %1$s"), custom_lease_file); } goto cleanup; @@ -3684,7 +3657,7 @@ networkGetDHCPLeases(virNetworkPtr net, =20 if (!(leases_array =3D virJSONValueFromString(lease_entries))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid json in file: %s"), custom_lease_file); + _("invalid json in file: %1$s"), custom_lease_file); goto cleanup; } =20 @@ -3868,7 +3841,7 @@ networkAllocatePort(virNetworkObj *obj, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), netdef->name); return -1; } @@ -3940,8 +3913,7 @@ networkAllocatePort(virNetworkObj *obj, =20 if (port->virtPortProfile) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not supported for = network " - "'%s' which uses IP forwarding"), + _(" not supported fo= r network '%2$s' which uses IP forwarding"), virNetDevVPortTypeToString(port->virtPortProfil= e->virtPortType), netdef->name); return -1; @@ -3964,8 +3936,7 @@ networkAllocatePort(virNetworkObj *obj, } if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' requires exclusive access " - "to interfaces, but none are available"), + _("network '%1$s' requires exclusive access to = interfaces, but none are available"), netdef->name); return -1; } @@ -3978,9 +3949,7 @@ networkAllocatePort(virNetworkObj *obj, if (port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBG && port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBH) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not supported = for network " - "'%s' which uses an SR-IOV Virtual Functi= on " - "via PCI passthrough"), + _(" not supporte= d for network '%2$s' which uses an SR-IOV Virtual Function via PCI passthro= ugh"), virNetDevVPortTypeToString(port->virtPortPr= ofile->virtPortType), netdef->name); return -1; @@ -4003,8 +3972,7 @@ networkAllocatePort(virNetworkObj *obj, /* only type=3D'openvswitch' is allowed for bridges */ if (port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VP= ORT_PROFILE_OPENVSWITCH) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not suppor= ted for network " - "'%s' which uses a bridge device"), + _(" not supp= orted for network '%2$s' which uses a bridge device"), virNetDevVPortTypeToString(port->virtPo= rtProfile->virtPortType), netdef->name); return -1; @@ -4040,8 +4008,7 @@ networkAllocatePort(virNetworkObj *obj, if (port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBG && port->virtPortProfile->virtPortType !=3D VIR_NETDEV_VPORT_= PROFILE_8021QBH) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _(" not supported = for network " - "'%s' which uses a macvtap device"), + _(" not supporte= d for network '%2$s' which uses a macvtap device"), virNetDevVPortTypeToString(port->virtPortPr= ofile->virtPortType), netdef->name); return -1; @@ -4053,8 +4020,7 @@ networkAllocatePort(virNetworkObj *obj, */ if ((netdef->forward.nifs <=3D 0) && (netdef->forward.npfs <=3D 0)= ) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' uses a direct mode, but " - "has no forward dev and no interface pool"), + _("network '%1$s' uses a direct mode, but has n= o forward dev and no interface pool"), netdef->name); return -1; } else { @@ -4093,8 +4059,7 @@ networkAllocatePort(virNetworkObj *obj, /* dev points at the physical device we want to use */ if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' requires exclusive access " - "to interfaces, but none are available"), + _("network '%1$s' requires exclusive access= to interfaces, but none are available"), netdef->name); return -1; } @@ -4162,7 +4127,7 @@ networkNotifyPort(virNetworkObj *obj, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), netdef->name); return -1; } @@ -4200,8 +4165,7 @@ networkNotifyPort(virNetworkObj *obj, /* dev points at the physical device we want to use */ if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have dev=3D'%s' " - "in use by network port '%s'"), + _("network '%1$s' doesn't have dev=3D'%2$s' in = use by network port '%3$s'"), netdef->name, port->plug.direct.linkdev, port->uuid); return -1; @@ -4217,8 +4181,7 @@ networkNotifyPort(virNetworkObj *obj, port->virtPortProfile && (port->virtPortProfile->virtPortType =3D=3D VIR_NETDEV_VPORT= _PROFILE_8021QBH)))) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' claims dev=3D'%s' is already in= " - "use by a different port"), + _("network '%1$s' claims dev=3D'%2$s' is alread= y in use by a different port"), netdef->name, port->plug.direct.linkdev); return -1; } @@ -4242,8 +4205,7 @@ networkNotifyPort(virNetworkObj *obj, /* dev points at the physical device we want to use */ if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have " - "PCI device %04x:%02x:%02x.%x in use by netwo= rk port"), + _("network '%1$s' doesn't have PCI device %2$04= x:%3$02x:%4$02x.%5$x in use by network port"), netdef->name, port->plug.hostdevpci.addr.domain, port->plug.hostdevpci.addr.bus, @@ -4259,9 +4221,7 @@ networkNotifyPort(virNetworkObj *obj, if ((dev->connections > 0) && netdef->forward.type =3D=3D VIR_NETWORK_FORWARD_HOSTDEV) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' claims the PCI device at " - "domain=3D%d bus=3D%d slot=3D%d function=3D%d= " - "is already in use by a different network por= t"), + _("network '%1$s' claims the PCI device at doma= in=3D%2$d bus=3D%3$d slot=3D%4$d function=3D%5$d is already in use by a dif= ferent network port"), netdef->name, dev->device.pci.domain, dev->device.pci.bus, dev->device.pci.slot, dev->device.pci.function); @@ -4332,8 +4292,7 @@ networkReleasePort(virNetworkObj *obj, case VIR_NETWORK_PORT_PLUG_TYPE_DIRECT: if (netdef->forward.nifs =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' uses a direct mode, but " - "has no forward dev and no interface pool"), + _("network '%1$s' uses a direct mode, but has n= o forward dev and no interface pool"), netdef->name); return -1; } @@ -4349,8 +4308,7 @@ networkReleasePort(virNetworkObj *obj, =20 if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have dev=3D'%s' " - "in use by domain"), + _("network '%1$s' doesn't have dev=3D'%2$s' in = use by domain"), netdef->name, port->plug.direct.linkdev); return -1; } @@ -4359,8 +4317,7 @@ networkReleasePort(virNetworkObj *obj, case VIR_NETWORK_PORT_PLUG_TYPE_HOSTDEV_PCI: if (netdef->forward.nifs =3D=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' uses a hostdev mode, but " - "has no forward dev and no interface pool"), + _("network '%1$s' uses a hostdev mode, but has = no forward dev and no interface pool"), netdef->name); return -1; } @@ -4377,8 +4334,7 @@ networkReleasePort(virNetworkObj *obj, =20 if (!dev) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("network '%s' doesn't have " - "PCI device %04x:%02x:%02x.%x in use by domai= n"), + _("network '%1$s' doesn't have PCI device %2$04= x:%3$02x:%4$02x.%5$x in use by domain"), netdef->name, port->plug.hostdevpci.addr.domain, port->plug.hostdevpci.addr.bus, @@ -4446,8 +4402,7 @@ networkCheckBandwidth(virNetworkObj *obj, if (virNetDevBandwidthHasFloor(ifaceBand) && !virNetDevBandwidthSupportsFloor(def->forward.type)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Invalid use of 'floor' on interface with MAC add= ress %s " - "- 'floor' is only supported for interface type '= network' with forward type 'nat', 'route', 'open' or none"), + _("Invalid use of 'floor' on interface with MAC add= ress %1$s - 'floor' is only supported for interface type 'network' with for= ward type 'nat', 'route', 'open' or none"), ifmac); return -1; } @@ -4455,8 +4410,7 @@ networkCheckBandwidth(virNetworkObj *obj, if (virNetDevBandwidthHasFloor(ifaceBand) && !(netBand && netBand->in)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, - _("Invalid use of 'floor' on interface with MAC " - "address %s - network '%s' has no inbound QoS set= "), + _("Invalid use of 'floor' on interface with MAC add= ress %1$s - network '%2$s' has no inbound QoS set"), ifmac, def->name); return -1; } @@ -4485,9 +4439,7 @@ networkCheckBandwidth(virNetworkObj *obj, tmp_new_rate =3D netBand->in->peak; if (tmp_floor_sum > netBand->in->peak) { virReportError(VIR_ERR_OPERATION_INVALID, - _("Cannot plug '%s' interface into '%s' because= " - "new combined inbound floor=3D%llu would over= commit " - "peak=3D%llu on network '%s'"), + _("Cannot plug '%1$s' interface into '%2$s' bec= ause new combined inbound floor=3D%3$llu would overcommit peak=3D%4$llu on = network '%5$s'"), ifmac, def->bridge, tmp_floor_sum, @@ -4499,9 +4451,7 @@ networkCheckBandwidth(virNetworkObj *obj, /* tmp_floor_sum can be between 'average' and 'peak' iff 'peak' is= set. * Otherwise, tmp_floor_sum must be below 'average'. */ virReportError(VIR_ERR_OPERATION_INVALID, - _("Cannot plug '%s' interface into '%s' because " - "new combined inbound floor=3D%llu would overcomm= it " - "average=3D%llu on network '%s'"), + _("Cannot plug '%1$s' interface into '%2$s' because= new combined inbound floor=3D%3$llu would overcommit average=3D%4$llu on n= etwork '%5$s'"), ifmac, def->bridge, tmp_floor_sum, @@ -4809,7 +4759,7 @@ networkPortLookupByUUID(virNetworkPtr net, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -4851,7 +4801,7 @@ networkPortCreateXML(virNetworkPtr net, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -4919,7 +4869,7 @@ networkPortGetXMLDesc(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -4959,7 +4909,7 @@ networkPortDelete(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -5007,7 +4957,7 @@ networkPortSetParameters(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -5098,7 +5048,7 @@ networkPortGetParameters(virNetworkPortPtr port, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } @@ -5160,7 +5110,7 @@ networkListAllPorts(virNetworkPtr net, =20 if (!virNetworkObjIsActive(obj)) { virReportError(VIR_ERR_OPERATION_INVALID, - _("network '%s' is not active"), + _("network '%1$s' is not active"), def->name); goto cleanup; } diff --git a/src/network/bridge_driver_conf.c b/src/network/bridge_driver_c= onf.c index 664e42bf99..a2edafa837 100644 --- a/src/network/bridge_driver_conf.c +++ b/src/network/bridge_driver_conf.c @@ -118,7 +118,7 @@ virNetworkDriverConfigNew(bool privileged) return NULL; =20 if (g_mkdir_with_parents(cfg->stateDir, 0777) < 0) { - virReportSystemError(errno, _("cannot create directory %s"), cfg->= stateDir); + virReportSystemError(errno, _("cannot create directory %1$s"), cfg= ->stateDir); return NULL; } =20 diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_= linux.c index d9597d91be..860793fba6 100644 --- a/src/network/bridge_driver_linux.c +++ b/src/network/bridge_driver_linux.c @@ -266,7 +266,7 @@ int networkCheckRouteCollision(virNetworkDef *def) if ((net_dest =3D=3D addr_val) && (netmask.data.inet4.sin_addr.s_addr =3D=3D mask_val)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Network is already in use by interface %= s"), + _("Network is already in use by interface %= 1$s"), iface); return -1; } @@ -291,8 +291,7 @@ int networkCheckRouteCollision(virNetworkDef *def) if (!addr_str) virResetLastError(); virReportError(VIR_ERR_INTERNAL_ERROR, - _("Route address '%s' conflicts " - "with IP address for '%s'"), + _("Route address '%1$s' conflicts with IP a= ddress for '%2$s'"), NULLSTR(addr_str), iface); return -1; } @@ -317,7 +316,7 @@ networkAddMasqueradingFirewallRules(virFirewall *fw, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid prefix or netmask for '%s'"), + _("Invalid prefix or netmask for '%1$s'"), def->bridge); return -1; } @@ -506,7 +505,7 @@ networkAddRoutingFirewallRules(virFirewall *fw, =20 if (prefix < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid prefix or netmask for '%s'"), + _("Invalid prefix or netmask for '%1$s'"), def->bridge); return -1; } @@ -833,8 +832,7 @@ int networkAddFirewallRules(virNetworkDef *def) */ if (virFirewallDIsRegistered() < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("zone %s requested for network %s " - "but firewalld is not active"), + _("zone %1$s requested for network %2$s but fir= ewalld is not active"), def->bridgeZone, def->name); return -1; } diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index 9ee42045d9..e1c0e81828 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -49,9 +49,9 @@ G_GNUC_NORETURN static void usage(int status) { if (status) { - fprintf(stderr, _("%s: try --help for more details\n"), program_na= me); + fprintf(stderr, _("%1$s: try --help for more details\n"), program_= name); } else { - printf(_("Usage: %s add|old|del|init mac|clientid ip [hostname]\n" + printf(_("Usage: %1$s add|old|del|init mac|clientid ip [hostname]\= n" "Designed for use with 'dnsmasq --dhcp-script'\n" "Refer to man page of dnsmasq for more details'\n"), program_name); @@ -103,7 +103,7 @@ main(int argc, char **argv) =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), program_name); + fprintf(stderr, _("%1$s: initialization failed\n"), program_name); exit(EXIT_FAILURE); } =20 @@ -137,7 +137,7 @@ main(int argc, char **argv) mac =3D argv[2]; =20 if ((action =3D virLeaseActionTypeFromString(argv[1])) < 0) { - fprintf(stderr, _("Unsupported action: %s\n"), argv[1]); + fprintf(stderr, _("Unsupported action: %1$s\n"), argv[1]); exit(EXIT_FAILURE); } =20 @@ -161,7 +161,7 @@ main(int argc, char **argv) /* Try to claim the pidfile, exiting if we can't */ if ((pid_file_fd =3D virPidFileAcquirePathFull(pid_file, true, false, = getpid())) < 0) { fprintf(stderr, - _("Unable to acquire PID file: %s\n errno=3D%d"), + _("Unable to acquire PID file: %1$s\n errno=3D%2$d"), pid_file, errno); goto cleanup; } @@ -170,7 +170,7 @@ main(int argc, char **argv) * corresponding custom lease file exists. If not, 'touch' it */ if (virFileTouch(custom_lease_file, 0644) < 0) { fprintf(stderr, - _("Unable to create: %s\n errno=3D%d"), + _("Unable to create: %1$s\n errno=3D%2$d"), custom_lease_file, errno); goto cleanup; } --=20 2.39.2