Util-Linux package development
 help / color / mirror / Atom feed
From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Subject: [PATCH 08/14] textual: give seven error messages the same form as two others
Date: Sun,  9 Feb 2025 09:23:24 +0100	[thread overview]
Message-ID: <20250209082330.4235-8-bensberg@telfort.nl> (raw)
In-Reply-To: <20250209082330.4235-1-bensberg@telfort.nl>

The form with the parentheses is easier for translators: it indicates
that the preceding text is not a translatable word.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 login-utils/newgrp.c | 6 +++---
 sys-utils/nsenter.c  | 4 ++--
 sys-utils/unshare.c  | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c
index b9b620ed7..ba3777b36 100644
--- a/login-utils/newgrp.c
+++ b/login-utils/newgrp.c
@@ -219,7 +219,7 @@ int main(int argc, char *argv[])
 
 	if (argc <= optind) {
 		if (setgid(pw_entry->pw_gid) < 0)
-			err(EXIT_FAILURE, _("setgid failed"));
+			err(EXIT_FAILURE, _("setgid() failed"));
 	} else {
 		errno = 0;
 		if (!(gr_entry = getgrnam(argv[optind++]))) {
@@ -231,11 +231,11 @@ int main(int argc, char *argv[])
 		if (!allow_setgid(pw_entry, gr_entry))
 			errx(EXIT_FAILURE, _("permission denied"));
 		if (setgid(gr_entry->gr_gid) < 0)
-			err(EXIT_FAILURE, _("setgid failed"));
+			err(EXIT_FAILURE, _("setgid() failed"));
 	}
 
 	if (setuid(getuid()) < 0)
-		err(EXIT_FAILURE, _("setuid failed"));
+		err(EXIT_FAILURE, _("setuid() failed"));
 
 	fflush(NULL);
 	shell = (pw_entry->pw_shell && *pw_entry->pw_shell ?
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
index 66ce4b324..214893d1a 100644
--- a/sys-utils/nsenter.c
+++ b/sys-utils/nsenter.c
@@ -836,9 +836,9 @@ int main(int argc, char *argv[])
 		if (force_gid && setgroups(0, NULL) != 0 && setgroups_nerrs)	/* drop supplementary groups */
 			err(EXIT_FAILURE, _("setgroups failed"));
 		if (force_gid && setgid(gid) < 0)		/* change GID */
-			err(EXIT_FAILURE, _("setgid failed"));
+			err(EXIT_FAILURE, _("setgid() failed"));
 		if (force_uid && setuid(uid) < 0)		/* change UID */
-			err(EXIT_FAILURE, _("setuid failed"));
+			err(EXIT_FAILURE, _("setuid() failed"));
 	}
 
 	if (keepcaps && (namespaces & CLONE_NEWUSER))
diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c
index 4d078e4d5..b6c2f8b45 100644
--- a/sys-utils/unshare.c
+++ b/sys-utils/unshare.c
@@ -1270,10 +1270,10 @@ int main(int argc, char *argv[])
 		if (setgroups(0, NULL) != 0)	/* drop supplementary groups */
 			err(EXIT_FAILURE, _("setgroups failed"));
 		if (setgid(gid) < 0)		/* change GID */
-			err(EXIT_FAILURE, _("setgid failed"));
+			err(EXIT_FAILURE, _("setgid() failed"));
 	}
 	if (force_uid && setuid(uid) < 0)	/* change UID */
-		err(EXIT_FAILURE, _("setuid failed"));
+		err(EXIT_FAILURE, _("setuid() failed"));
 
 	if (keepcaps && (unshare_flags & CLONE_NEWUSER))
 		cap_permitted_to_ambient();
-- 
2.48.1


  parent reply	other threads:[~2025-02-09  8:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09  8:23 [PATCH 01/14] setpriv: make message for failing PR_GET_PDEATHSIG the same as the other Benno Schulenberg
2025-02-09  8:23 ` [PATCH 02/14] unshare: don't use "=" before a required option argument Benno Schulenberg
2025-02-09  8:23 ` [PATCH 03/14] unshare: use single asterisks around long options, double around values Benno Schulenberg
2025-02-09  8:23 ` [PATCH 04/14] textual: remove other inconsistent uses of "=" before option argument Benno Schulenberg
2025-02-09  8:23 ` [PATCH 05/14] textual: consistently mark "=" as literal before an optional argument Benno Schulenberg
2025-02-09  8:23 ` [PATCH 06/14] mount: properly mark the arguments of the 'ro' and 'rw' extended options Benno Schulenberg
2025-02-09  8:23 ` [PATCH 07/14] unshare: don't mark "|" and ":" as part of the placeholders Benno Schulenberg
2025-02-09  8:23 ` Benno Schulenberg [this message]
2025-02-09  8:23 ` [PATCH 09/14] blkpr: grammarize the description of the tool and its options Benno Schulenberg
2025-02-09  8:23 ` [PATCH 10/14] blkzone: correct the wording of an error message, from ioctl to function Benno Schulenberg
2025-02-10 11:28   ` Karel Zak
2025-02-09  8:23 ` [PATCH 11/14] renice: put text that belongs together into a single translatable message Benno Schulenberg
2025-02-09  8:23 ` [PATCH 12/14] man pages: use the same verb for --version as for --help, like in usages Benno Schulenberg
2025-02-09  8:23 ` [PATCH 13/14] usage: mention also the missing KiB and MiB as permissible suffixes Benno Schulenberg
2025-02-09  8:23 ` [PATCH 14/14] zramctl: improve grammar in usage and don't gettextize list of algorithms Benno Schulenberg
2025-02-12 10:01 ` [PATCH 01/14] setpriv: make message for failing PR_GET_PDEATHSIG the same as the other Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250209082330.4235-8-bensberg@telfort.nl \
    --to=bensberg@telfort.nl \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox