From: Ævar Arnfjörð Bjarmason Date: Mon, 3 May 2010 18:24:26 +0000 (+0000) Subject: ionice: non-cryptic error message when ionice can't execvp X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=048b81c9ffd2554900523ff55718ab8914176f77;p=util-linux ionice: non-cryptic error message when ionice can't execvp Previously ionice would reply like this when it couldn't find the command to execute: $ ionice -c 3 does-not-exist ionice: execvp failed: No such file or directory Getting that message from cron because you haven't set the right $PATH makes it hard to track down the problem. Now it says: $ ionice -c 3 does-not-exist ionice: executing does-not-exist failed: No such file or directory Signed-off-by: Ævar Arnfjörð Bjarmason --- diff --git a/schedutils/ionice.c b/schedutils/ionice.c index a57cf7f2..3ad4ef9a 100644 --- a/schedutils/ionice.c +++ b/schedutils/ionice.c @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) ioprio_setpid(0, ioprio, ioclass); execvp(argv[optind], &argv[optind]); /* execvp should never return */ - err(EXIT_FAILURE, _("execvp failed")); + err(EXIT_FAILURE, _("executing %s failed"), argv[optind]); } }