From nobody Fri Dec 19 06:34:39 2025 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=1678464731; cv=none; d=zohomail.com; s=zohoarc; b=e52SI5ulp4L5jU7vaf+eSMldiaNE7GCk5Q5bfw3lLkgogTYTAKRjtbYwbwSGDw7lS2Aka2XSJz2tWtc5Em5foY16ONSsTRDiodreeHxm5YbGsdPeoWEaxrDeZNmdUxZTjvQ6VVXcUyKG72OLdjgthT3rTooPZ7s6fsnC/KrDexs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678464731; 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=BtN6M++X8D15ENxsBCBXBcbhed31V2BE0BbNTCUT8Wk=; b=lIalO9zJo66nSL8g/KJmqd376KMI5+hygSj9MQ8atidj+oCooF7cteIsEr6iei8iYQO8enGhhSxwb+6AlFgXGNppUJ3ygQV5+t16Yz7aYKyhq6EnUeAhYtY/meLJB9drY/bhAQd2xRJfA3dHZrw0FXL7vuh72PhvHjYnx/gCWcs= 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 1678464731326507.9705415334274; Fri, 10 Mar 2023 08:12:11 -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-643-2bO5IAjINAmSpGrHoin9xA-1; Fri, 10 Mar 2023 11:11:16 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5FBB71C17441; Fri, 10 Mar 2023 16:10:39 +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 4CEB7440D8; Fri, 10 Mar 2023 16:10:39 +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 2F11A1946A4A; Fri, 10 Mar 2023 16:10:39 +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 C0BF41946A54 for ; Fri, 10 Mar 2023 16:10:37 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B671D2166B2B; Fri, 10 Mar 2023 16:10:37 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.45.226.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78A4B2166B2A for ; Fri, 10 Mar 2023 16:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678464730; 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=BtN6M++X8D15ENxsBCBXBcbhed31V2BE0BbNTCUT8Wk=; b=YwyDKo9vpnaBsq45FIm3Mnf0kDAbBxp/gXVs+0iFVTdapfWCcP5AMC/J1I/e5rn1a47IMr MiuKZgcOxy3UebCS57TYxLv6t5RYJXbAgdCFBwdYeKCJ6Ldk4MpfKOkq6d7sS2OcwDRiCb f+PMNNG/XjVrv7Wq5NVU9rqvhZTk06c= X-MC-Unique: 2bO5IAjINAmSpGrHoin9xA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 18/51] logging: Update format strings in translated messages Date: Fri, 10 Mar 2023 17:09:34 +0100 Message-Id: <534fade9c98455bbb115ab65fdb01157c8e26685.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.5 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: 1678464733629100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark --- src/logging/log_cleaner.c | 2 +- src/logging/log_daemon.c | 26 +++++++++++++------------- src/logging/log_daemon_dispatch.c | 2 +- src/logging/log_handler.c | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/logging/log_cleaner.c b/src/logging/log_cleaner.c index 38f818f177..4ee91843aa 100644 --- a/src/logging/log_cleaner.c +++ b/src/logging/log_cleaner.c @@ -87,7 +87,7 @@ virLogCleanerParseFilename(const char *path, =20 if (virStrToLong_i(rotated_index_str, NULL, 10, rotated_index) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to parse rotated index from '%s'"), + _("Failed to parse rotated index from '%1$s'"), rotated_index_str); return NULL; } diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index b4db585810..daf7ef4b2f 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -190,7 +190,7 @@ virLogDaemonNewServerPostExecRestart(virNetDaemon *dmn, dmn); } else { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected server name '%s' during restart"), + _("Unexpected server name '%1$s' during restart"), name); return NULL; } @@ -336,14 +336,14 @@ virLogDaemonClientNew(virNetServerClient *client, =20 if (!privileged) { if (geteuid() !=3D clientuid) { - virReportRestrictedError(_("Disallowing client %llu with uid %= llu"), + virReportRestrictedError(_("Disallowing client %1$llu with uid= %2$llu"), (unsigned long long)priv->clientPid, (unsigned long long)clientuid); goto error; } } else { if (clientuid !=3D 0) { - virReportRestrictedError(_("Disallowing client %llu with uid %= llu"), + virReportRestrictedError(_("Disallowing client %1$llu with uid= %2$llu"), (unsigned long long)priv->clientPid, (unsigned long long)clientuid); goto error; @@ -518,7 +518,7 @@ virLogDaemonPreExecRestart(const char *state_file, =20 if (virFileWriteStr(state_file, state, 0700) < 0) { virReportSystemError(errno, - _("Unable to save state file %s"), state_file= ); + _("Unable to save state file %1$s"), state_fi= le); return -1; } =20 @@ -540,7 +540,7 @@ virLogDaemonUsage(const char *argv0, bool privileged) fprintf(stderr, _("\n" "Usage:\n" - " %s [options]\n" + " %1$s [options]\n" "\n" "Options:\n" " -h | --help Display program help:\n" @@ -559,13 +559,13 @@ virLogDaemonUsage(const char *argv0, bool privileged) " Default paths:\n" "\n" " Configuration file (unless overridden by -f):\n" - " %s/libvirt/virtlogd.conf\n" + " %1$s/libvirt/virtlogd.conf\n" "\n" " Sockets:\n" - " %s/libvirt/virtlogd-sock\n" + " %2$s/libvirt/virtlogd-sock\n" "\n" " PID file (unless overridden by -p):\n" - " %s/virtlogd.pid\n" + " %3$s/virtlogd.pid\n" "\n"), SYSCONFDIR, RUNSTATEDIR, @@ -625,7 +625,7 @@ int main(int argc, char **argv) { =20 if (virGettextInitialize() < 0 || virErrorInitialize() < 0) { - fprintf(stderr, _("%s: initialization failed\n"), argv[0]); + fprintf(stderr, _("%1$s: initialization failed\n"), argv[0]); exit(EXIT_FAILURE); } =20 @@ -705,7 +705,7 @@ int main(int argc, char **argv) { /* Read the config file if it exists */ if (remote_config_file && virLogDaemonConfigLoadFile(config, remote_config_file, implicit_co= nf) < 0) { - VIR_ERROR(_("Can't load config file: %s: %s"), + VIR_ERROR(_("Can't load config file: %1$s: %2$s"), virGetLastErrorMessage(), remote_config_file); exit(EXIT_FAILURE); } @@ -764,7 +764,7 @@ int main(int argc, char **argv) { old_umask =3D umask(077); VIR_DEBUG("Ensuring run dir '%s' exists", run_dir); if (g_mkdir_with_parents(run_dir, 0777) < 0) { - VIR_ERROR(_("unable to create rundir %s: %s"), run_dir, + VIR_ERROR(_("unable to create rundir %1$s: %2$s"), run_dir, g_strerror(errno)); ret =3D VIR_DAEMON_ERR_RUNDIR; umask(old_umask); @@ -790,13 +790,13 @@ int main(int argc, char **argv) { =20 if (godaemon) { if (chdir("/") < 0) { - VIR_ERROR(_("cannot change to root directory: %s"), + VIR_ERROR(_("cannot change to root directory: %1$s"), g_strerror(errno)); goto cleanup; } =20 if ((statuswrite =3D virDaemonForkIntoBackground(argv[0])) < 0= ) { - VIR_ERROR(_("Failed to fork as daemon: %s"), + VIR_ERROR(_("Failed to fork as daemon: %1$s"), g_strerror(errno)); goto cleanup; } diff --git a/src/logging/log_daemon_dispatch.c b/src/logging/log_daemon_dis= patch.c index f7448155fc..f1c8163cca 100644 --- a/src/logging/log_daemon_dispatch.c +++ b/src/logging/log_daemon_dispatch.c @@ -117,7 +117,7 @@ virLogManagerProtocolDispatchDomainReadLogFile(virNetSe= rver *server G_GNUC_UNUSE =20 if (args->maxlen > VIR_LOG_MANAGER_PROTOCOL_STRING_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Requested data len %llu is larger than maximum %= d"), + _("Requested data len %1$llu is larger than maximum= %2$d"), (unsigned long long)args->maxlen, VIR_LOG_MANAGER_PROTOCOL_STRING_MAX); goto cleanup; diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index a739211c7c..71517bbbe5 100644 --- a/src/logging/log_handler.c +++ b/src/logging/log_handler.c @@ -354,7 +354,7 @@ virLogHandlerDomainOpenLogFile(virLogHandler *handler, if (STREQ(virRotatingFileWriterGetPath(handler->files[i]->file), path)) { virReportSystemError(EBUSY, - _("Cannot open log file: '%s'"), + _("Cannot open log file: '%1$s'"), path); goto error; } @@ -471,7 +471,7 @@ virLogHandlerDomainGetLogFilePosition(virLogHandler *ha= ndler, =20 if (!file) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("No open log file %s"), + _("No open log file %1$s"), path); goto cleanup; } --=20 2.39.2