Util-Linux package development
 help / color / mirror / Atom feed
From: Benno Schulenberg <bensberg@telfort.nl>
To: util-linux@vger.kernel.org
Subject: [PATCH 01/11] ipcrm: move a constant argument in order to gettextize the message
Date: Tue, 25 Mar 2025 11:42:55 +0100	[thread overview]
Message-ID: <20250325104305.23980-1-bensberg@telfort.nl> (raw)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/ipcrm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index 11adf2f80..ceb101187 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -173,7 +173,7 @@ static int deprecated_main(int argc, char **argv)
 	return 1;
 }
 
-static unsigned long strtokey(const char *str, const char *errmesg)
+static unsigned long strtokey(const char *str)
 {
 	unsigned long num;
 	char *end = NULL;
@@ -190,9 +190,9 @@ static unsigned long strtokey(const char *str, const char *errmesg)
 	return num;
  err:
 	if (errno)
-		err(EXIT_FAILURE, "%s: '%s'", errmesg, str);
+		err(EXIT_FAILURE, _("failed to parse argument: '%s'"), str);
 	else
-		errx(EXIT_FAILURE, "%s: '%s'", errmesg, str);
+		errx(EXIT_FAILURE, _("failed to parse argument: '%s'"), str);
 	return 0;
 }
 
@@ -200,7 +200,7 @@ static int key_to_id(type_id type, char *s)
 {
 	int id;
 	/* keys are in hex or decimal */
-	key_t key = strtokey(s, "failed to parse argument");
+	key_t key = strtokey(s);
 	if (key == IPC_PRIVATE) {
 		warnx(_("illegal key (%s)"), s);
 		return -1;
-- 
2.48.1


             reply	other threads:[~2025-03-25 10:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 10:42 Benno Schulenberg [this message]
2025-03-25 10:42 ` [PATCH 02/11] ipcrm: in usage text, use two lines when option+arguments is very long Benno Schulenberg
2025-03-25 10:42 ` [PATCH 03/11] ipcutils, lsipc: unabbreviate two words in some error messages Benno Schulenberg
2025-03-25 10:42 ` [PATCH 04/11] chmem: print warnings about failures always (not only with --verbose) Benno Schulenberg
2025-03-25 10:42 ` [PATCH 05/11] chmem: (man) add missing end-of-bold marker, and add missing OR bar Benno Schulenberg
2025-03-25 10:43 ` [PATCH 06/11] fstrim: mark only the mountpoint as placeholder, not options -A and -a Benno Schulenberg
2025-03-25 10:43 ` [PATCH 07/11] swapon: improve a translator hint, and remove a pointless one Benno Schulenberg
2025-03-25 10:43 ` [PATCH 08/11] mkfs.cramfs: reduce the synopsis to the standard, succinct form Benno Schulenberg
2025-03-25 10:43 ` [PATCH 09/11] mkfs.cramfs: vertically align the option descriptions of the usage text Benno Schulenberg
2025-03-25 10:43 ` [PATCH 10/11] mkfs.cramfs: (man) mark arguments of -N and -l in bold, not italics Benno Schulenberg
2025-03-25 10:43 ` [PATCH 11/11] ipcs: align the first group of options with later ones in the usage text Benno Schulenberg
2025-03-27  9:54 ` [PATCH 01/11] ipcrm: move a constant argument in order to gettextize the message 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=20250325104305.23980-1-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