]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
translation: unify exec error messages
authorSami Kerola <kerolasa@iki.fi>
Wed, 30 Jan 2013 20:33:24 +0000 (20:33 +0000)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Feb 2013 10:51:17 +0000 (11:51 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
15 files changed:
login-utils/newgrp.c
login-utils/su-common.c
login-utils/sulogin.c
schedutils/chrt.c
schedutils/ionice.c
schedutils/taskset.c
sys-utils/flock.c
sys-utils/nsenter.c
sys-utils/prlimit.c
sys-utils/rtcwake.c
sys-utils/setarch.c
sys-utils/setsid.c
sys-utils/swapon.c
sys-utils/unshare.c
text-utils/pg.c

index 02e76c3d942878fd35385685792f01083f02f2d0..62695474e4e251c9dd36f3a59e6d06e55d6593d8 100644 (file)
@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
        fflush(stdout);
        fflush(stderr);
        execl(shell, shell, (char *)0);
-       warn(_("exec %s failed"), shell);
+       warn(_("failed to execute %s"), shell);
        fflush(stderr);
 
        return EXIT_FAILURE;
index 47e05ff7d0cf76716761ea391778c14c83bb29e0..3ef4ec472176d98d7f2c4b608d38fa1c3aaf90ae 100644 (file)
@@ -593,7 +593,7 @@ run_shell (char const *shell, char const *command, char **additional_args,
 
   {
     int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
-    warn ("%s", shell);
+    warn (_("failed to execute %s"), shell);
     exit (exit_status);
   }
 }
@@ -913,7 +913,7 @@ su_main (int argc, char **argv, int mode)
     run_shell (shell, command, argv + optind, max (0, argc - optind));
   else {
     execvp(argv[optind], &argv[optind]);
-    err(EXIT_FAILURE, _("executing %s failed"), argv[optind]);
+    err(EXIT_FAILURE, _("failed to execute %s"), argv[optind]);
   }
 }
 
index cf429fe5c7162e13275e71bb72cd81344b24f84c..db5f41e2b3b5fb603b96daf6001b4e9bef086363 100644 (file)
@@ -736,11 +736,11 @@ static void sushell(struct passwd *pwd)
        }
 #endif
        execl(su_shell, shell, NULL);
-       warn(_("%s: exec failed"), su_shell);
+       warn(_("failed to execute %s"), su_shell);
 
        setenv("SHELL", "/bin/sh", 1);
        execl("/bin/sh", profile ? "-sh" : "sh", NULL);
-       warn(_("%s: exec failed"), "/bin/sh");
+       warn(_("failed to execute %s"), "/bin/sh");
 }
 
 static void usage(FILE *out)
index 034791448e0b813d260541185675872ed65182a5..60ec73e3af66f4ac25aa8a5931cc76870ba5f3f2 100644 (file)
@@ -331,7 +331,6 @@ int main(int argc, char **argv)
        if (!pid) {
                argv += optind + 1;
                execvp(argv[0], argv);
-               perror("execvp");
                err(EXIT_FAILURE, _("failed to execute %s"), argv[0]);
        }
 
index f74e3c4ad615122afd16d41d71e0b74e69707882..b7e6087eaeeb4b3c1c8b1fb5c1bfbeafd3ff36ae 100644 (file)
@@ -229,7 +229,7 @@ int main(int argc, char **argv)
                 */
                ioprio_setpid(0, ioclass, data);
                execvp(argv[optind], &argv[optind]);
-               err(EXIT_FAILURE, _("executing %s failed"), argv[optind]);
+               err(EXIT_FAILURE, _("failed to execute %s"), argv[optind]);
        } else
                usage(stderr);
 
index 903959848f9af1abd30e217f50153b79fb372dc4..aba0b6f9ee02b0bf5069feaa8eab031fd4691944 100644 (file)
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
        if (!pid) {
                argv += optind + 1;
                execvp(argv[0], argv);
-               err(EXIT_FAILURE, _("executing %s failed"), argv[0]);
+               err(EXIT_FAILURE, _("failed to execute %s"), argv[0]);
        }
 
        return EXIT_SUCCESS;
index 6147e97ea7108e1668927fc3190671801a06ec48..24576b139916e31bbbd8aa84d6e557e7a955f36f 100644 (file)
@@ -317,7 +317,7 @@ int main(int argc, char *argv[])
                                close(fd);
                        execvp(cmd_argv[0], cmd_argv);
                        /* execvp() failed */
-                       warn("%s", cmd_argv[0]);
+                       warn(_("failed to execute %s"), cmd_argv[0]);
                        _exit((errno == ENOMEM) ? EX_OSERR : EX_UNAVAILABLE);
                } else {
                        do {
index b6e6dc1a48c9519f83c4b44f8a708d4b100dfe83..3df433812c567aeeaa36287c8038c49446d9993e 100644 (file)
@@ -319,5 +319,5 @@ int main(int argc, char *argv[])
 
        execvp(argv[optind], argv + optind);
 
-       err(EXIT_FAILURE, _("exec %s failed"), argv[optind]);
+       err(EXIT_FAILURE, _("failed to execute %s"), argv[optind]);
 }
index a619bea3eec227a621c2153699a67c0b23b29185..9098e49760fd6fefc1ff5a2090ce8f964ebe8e7a 100644 (file)
@@ -637,7 +637,7 @@ int main(int argc, char **argv)
        if (argc > optind) {
                /* prlimit [options] COMMAND */
                execvp(argv[optind], &argv[optind]);
-               err(EXIT_FAILURE, _("executing %s failed"), argv[optind]);
+               err(EXIT_FAILURE, _("failed to execute %s"), argv[optind]);
        }
 
        return EXIT_SUCCESS;
index 0edf7dc81442151af3b84d4ea3e97d186781a884..f0dada2e05954cab66e17ae032a00ccae6726240 100644 (file)
@@ -573,7 +573,7 @@ int main(int argc, char **argv)
                if (!dryrun) {
                        execv(arg[0], arg);
 
-                       warn(_("unable to execute %s"), _PATH_SHUTDOWN);
+                       warn(_("failed to execute %s"), _PATH_SHUTDOWN);
                        rc = EXIT_FAILURE;
                }
 
index d13cdd62135999f5f367a00d0f6a0a761654dde9..afa2d1bf1ce6334b64e5254b5ae7f549bb007e75 100644 (file)
@@ -279,7 +279,7 @@ int main(int argc, char *argv[])
        if (set_arch(p, 0L))
            err(EXIT_FAILURE, _("Failed to set personality to %s"), p);
        execl("/bin/bash", NULL);
-       err(EXIT_FAILURE, "/bin/bash");
+       err(EXIT_FAILURE, _("failed to execute %s"), "/bin/bash");
    }
   #endif
 
@@ -342,7 +342,7 @@ int main(int argc, char *argv[])
 
   if (!argc) {
     execl("/bin/sh", "-sh", NULL);
-    err(EXIT_FAILURE, "/bin/sh");
+    err(EXIT_FAILURE, _("failed to execute %s"), "/bin/sh");
   }
 
   execvp(argv[0], argv);
index 20bd0d7bac9daa84e9c5ae2a9f2cdfe54bbaeb61..b3e6ebfaffab721423c749f102ea8204c50e3359 100644 (file)
@@ -94,5 +94,5 @@ int main(int argc, char **argv)
                        warn(_("failed to set the controlling terminal"));
        }
        execvp(argv[optind], argv + optind);
-       err(EXIT_FAILURE, _("execvp failed"));
+       err(EXIT_FAILURE, _("failed to execute %s"), argv[optind]);
 }
index 6efe482961e27e2c92b549bbc6991b9407f7839c..d5b7e378964d03fc9d30175c5a3c334307733ca7 100644 (file)
@@ -279,7 +279,7 @@ static int swap_reinitialize(const char *device,
                cmd[idx++] = (char *) device;
                cmd[idx++] = NULL;
                execv(cmd[0], cmd);
-               err(EXIT_FAILURE, _("execv failed"));
+               err(EXIT_FAILURE, _("failed to execute %s"), cmd[0]);
 
        default: /* parent */
                do {
index 4639ac8e629e30a7f8a295acb03440a534b20fde..62d2fcbbfb976df7fcdbe0808779da3c8b879991 100644 (file)
@@ -115,5 +115,5 @@ int main(int argc, char *argv[])
 
        execvp(argv[optind], argv + optind);
 
-       err(EXIT_FAILURE, _("exec %s failed"), argv[optind]);
+       err(EXIT_FAILURE, _("failed to execute %s"), argv[optind]);
 }
index 95f59a9443e5e709f186c20f4a16475d93e71814..ab7a85a9585fd0dc302ac064f277fe7ba1071061 100644 (file)
@@ -1348,7 +1348,7 @@ static void pgfile(FILE *f, const char *name)
                                                my_sigset(SIGTERM, oldterm);
                                                execl(sh, sh, "-c",
                                                      cmd.cmdline + 1, NULL);
-                                               warn("%s", sh);
+                                               warn(_("failed to execute %s"), sh);
                                                _exit(0177);
                                                /* NOTREACHED */
                                        }