From 048b81c9ffd2554900523ff55718ab8914176f77 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 3 May 2010 18:24:26 +0000 Subject: [PATCH] ionice: non-cryptic error message when ionice can't execvp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- schedutils/ionice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); } } -- 2.39.5