From: Alejandro Colomar Date: Thu, 25 Jun 2026 20:28:59 +0000 (+0200) Subject: src/: Simplify error strings X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=33c1736e03be2cefbc1143ffaec896d7139d3cae;p=thirdparty%2Fshadow.git src/: Simplify error strings Avoid language that would need translation. Move language that would need translation to a separate argument. Closes: Reported-by: Rafael Fontenelle Signed-off-by: Alejandro Colomar --- diff --git a/src/useradd.c b/src/useradd.c index d35c7e43f..1d712fd4c 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -2304,13 +2304,13 @@ static void create_home(const struct option_flags *flags) } if (chown(path, 0, 0) < 0) { fprintf(stderr, - _("%s: warning: chown on `%s' failed: %m\n"), - Prog, path); + "%s: %s: chown(%s): %m\n", + Prog, _("warning"), path); } if (chmod(path, 0755) < 0) { fprintf(stderr, - _("%s: warning: chmod on `%s' failed: %m\n"), - Prog, path); + "%s: %s: chmod(%s): %m\n", + Prog, _("warning"), path); } } free(bhome); @@ -2319,8 +2319,8 @@ static void create_home(const struct option_flags *flags) mode = getdef_num("HOME_MODE", 0777 & ~getdef_num("UMASK", GETDEF_DEFAULT_UMASK)); if (chmod(prefix_user_home, mode)) { - fprintf(stderr, _("%s: warning: chown on '%s' failed: %m\n"), - Prog, path); + fprintf(stderr, "%s: %s: chown(%s): %m\n", + Prog, _("warning"), path); } home_added = true; #ifdef WITH_AUDIT diff --git a/src/vipw.c b/src/vipw.c index 76edd42a5..05c2935fc 100644 --- a/src/vipw.c +++ b/src/vipw.c @@ -314,15 +314,15 @@ vipwedit (const char *file, int (*file_lock) (void), int (*file_unlock) (bool)) status = system (buf); if (-1 == status) { - fprintf(stderr, _("%s: %s: %s\n"), Prog, editor, strerrno()); + fprintf(stderr, "%s: %s: %s\n", Prog, editor, strerrno()); exit (1); } else if ( WIFEXITED (status) && (WEXITSTATUS (status) != 0)) { - fprintf (stderr, _("%s: %s returned with status %d\n"), + fprintf(stderr, "%s: %s: WEXITSTATUS(): %d\n", Prog, editor, WEXITSTATUS (status)); exit (WEXITSTATUS (status)); } else if (WIFSIGNALED (status)) { - fprintf (stderr, _("%s: %s killed by signal %d\n"), + fprintf(stderr, "%s: %s: WTERMSIG(): %d\n", Prog, editor, WTERMSIG (status)); exit (1); } else {